Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync from master #6981

Merged
merged 23 commits into from
Feb 25, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
feed84b
fix rt_kprint 64bit error
zhkag Feb 20, 2023
ff58949
update rtdevice.h add lcd
XYZ-20240101 Feb 18, 2023
aaba21c
[fix]避免字符设备特殊控制指令和通用控制指令冲突
JonasWen Feb 21, 2023
1533b88
[arduino][lpc55s69] : 对接RTduino
Z8MAN8 Feb 22, 2023
b3b8c23
[spi] rt_spi_configure 增加对cs_pin处理
liYony Feb 23, 2023
52cb2f0
[lwIP] apply AF_UNIX feature (#6954)
Guozhanxin Feb 23, 2023
6d4764a
serial_v2 rt_device_write/read return data type as rt_ssize_t
JonasWen Feb 23, 2023
96a636f
[Renesas]Add tft-lcd lvgl support
Rbb666 Feb 22, 2023
08c2a65
[rtduino][lpc55s69] 修正RTduino框架下的引脚错误 (#6963)
kurisaW Feb 23, 2023
382e9bc
[rt-smart] handling kernel from accessing unmapped user stack (#6957)
polarvid Feb 24, 2023
7bf6648
[serial]增加at32的serial_v2驱动
JonasWen Feb 23, 2023
a5c62b9
[bsp/at32] add support usb driver (#6968)
sheltonyu Feb 25, 2023
022760c
[Infineon]Fix scb5 can't use bug
Rbb666 Feb 24, 2023
faddfec
[rtduino][lpc55s69] update (#6972)
Z8MAN8 Feb 25, 2023
7763183
[rtduino][lpc55s69] 纠正uart引脚错误并使能相关依赖项 (#6976)
kurisaW Feb 25, 2023
e50a7e3
🐞 fix(components/drivers/tty/pty.c): fix ptmx not init (#6970)
xqyjlj Feb 25, 2023
4c1c6ef
解决关中断时进行了调度操作
zhkag Feb 24, 2023
d3553e7
fixed fstat/stat/readlink syscall.
geniusgogo Feb 24, 2023
53afeda
fix inet_ioctlsocket set O_LARGEFILE flag by musl.
geniusgogo Feb 24, 2023
a53367a
fixed O_LARGEFILE not defined ci build error.
geniusgogo Feb 25, 2023
fef2607
[lwp] save virtual addr in shm structure
polarvid Feb 25, 2023
12f0df9
[libcpu/aarch64] stop when no page is free
polarvid Feb 25, 2023
e63e33a
[ch32][bsp] fix warning: rt_size_t to rt_ssize_t
linshire Feb 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[rtduino][lpc55s69] 修正RTduino框架下的引脚错误 (#6963)
1.修正RTduino框架下的引脚错误
2.Kconfig新增RTduino依赖项
3.README文档完善
4.上传LPC55s69兼容arduino部分引脚图
  • Loading branch information
kurisaW committed Feb 23, 2023
commit 08c2a651360899ca59e90433dfb78579a642fd75
23 changes: 8 additions & 15 deletions bsp/lpc55sxx/lpc55s69_nxp_evk/applications/arduino_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,20 @@
* Change Logs:
* Date Author Notes
* 2023-02-22 ChuShicheng first version
* 2023-02-23 Wangyuqiang second version
*/

#include <Arduino.h>

int led = 37; /* LED pin */
int brightness = 0;
int fadeAmount = 5;

void setup()
void setup(void)
{
/* Do not invoke pinMode for the PWM IO! */
/* put your setup code here, to run once: */
Serial.begin();
}

void loop()
void loop(void)
{
analogWrite(led, brightness);
brightness = brightness + fadeAmount;
if (brightness <= 0 || brightness >= 255)
{
fadeAmount = -fadeAmount;
}

delay(100);
/* put your main code here, to run repeatedly: */
Serial.println("Hello Arduino!");
delay(800);
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 35 additions & 24 deletions bsp/lpc55sxx/lpc55s69_nxp_evk/applications/arduino_pinout/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# lpc55s69_nxp_evk开发板的Arduino生态兼容说明
# LPC55s69-nxp-evk开发板的Arduino生态兼容说明

## 1 RTduino - RT-Thread的Arduino生态兼容层

lpc55s69_nxp_evk开发板已经完整适配了[RTduino软件包](https://github.com/RTduino/RTduino),即RT-Thread的Arduino生态兼容层。用户可以按照Arduino的编程习惯来操作该BSP,并且可以使用大量Arduino社区丰富的库,是对RT-Thread生态的极大增强。更多信息,请参见[RTduino软件包说明文档](https://github.com/RTduino/RTduino)。
LPC55s69-nxp-evk开发板已经完整适配了[RTduino软件包](https://github.com/RTduino/RTduino),即RT-Thread的Arduino生态兼容层。用户可以按照Arduino的编程习惯来操作该BSP,并且可以使用大量Arduino社区丰富的库,是对RT-Thread生态的极大增强。更多信息,请参见[RTduino软件包说明文档](https://github.com/RTduino/RTduino)。

### 1.1 如何开启针对本BSP的Arduino生态兼容层

Expand All @@ -18,27 +18,38 @@ Hardware Drivers Config --->

更多引脚布局相关信息参见 [pins_arduino.c](pins_arduino.c) 和 [pins_arduino.h](pins_arduino.h)。

![LPC55s69-nxp-evk-pinout1](LPC55s69-nxp-evk-pinout1.png)

![LPC55s69-nxp-evk-pinout2](LPC55s69-nxp-evk-pinout2.png)

| Arduino引脚编号 | STM32引脚编号 | 5V容忍 | 备注 |
| ------------------- | --------- | ---- | ------------------------------------------------------------------------- |
| 0 (D0) | P | 是/否 | |
| 1 (D1) | P | 是/否 | PWM1-CH3,默认被RT-Thread的PWM设备框架pwm1接管 |
| 2 (D2) | P | 是/否 | Serial-RX,默认被RT-Thread的UART设备框架uart1接管 |
| 3 (D3) | P | 是/否 | Serial-TX,默认被RT-Thread的UART设备框架uart1接管 |
| 4 (D4) | P | 是/否 | PWM2-CH1,默认被RT-Thread的PWM设备框架pwm2接管 |
| 5 (D5) | P | 是/否 | PWM2-CH2,默认被RT-Thread的PWM设备框架pwm2接管 |
| 6 (D6) | P | 是/否 | 板载用户LED |
| 7 (D7) | P | 是/否 | PWM1-CH0,默认被RT-Thread的PWM设备框架pwm1接管 |
| 8 (D8) | P | 是/否 | |
| 9 (D9) | P | 是/否 | PWM2-CH0,默认被RT-Thread的PWM设备框架pwm2接管 |
| 10 (D10) | P | 是/否 | |
| 11 (D11) | P | 是/否 | |
| 12 (D12) | P | 是/否 | |
| 13 (D13) | P | 是/否 | |
| 14 (D14) | P | 是/否 | PWM3-CH2,默认被RT-Thread的PWM设备框架pwm3接管 |
| 15 (D15) | P | 是/否 | |
| 16 (D16) | P | 是/否 | I2C1-SCL,默认被RT-Thread的I2C设备框架i2c1接管 |
| 17 (D17) | P | 是/否 | I2C1-SDA,默认被RT-Thread的I2C设备框架i2c1接管 |
| 18 (A0) | P | 是/否 | ADC0-CH8,默认被RT-Thread的ADC设备框架adc0接管 |
| 19 (A1) | P | 是/否 | ADC0-CH0,默认被RT-Thread的ADC设备框架adc0接管 |
| 20 (A2) | -- | | 芯片内部温度 ADC,默认被RT-Thread的ADC设备框架adc1接管 |
| 21 (A3) | -- | | 芯片内部参考电压 ADC,默认被RT-Thread的ADC设备框架adc1接管 |
| 0 (D0) | P(1,24) | 是/否 | Serial2-RX,默认被RT-Thread的UART设备框架uart1接管 |
| 1 (D1) | P(0,27) | 是/否 | Serial2-TX,默认被RT-Thread的UART设备框架uart1接管 |
| 2 (D2) | P(0,15) | 是/否 | |
| 3 (D3) | P(1,6) | 是/否 | |
| 4 (D4) | P(1,7) | 是/否 | PWM2-CH2,默认被RT-Thread的PWM设备框架pwm2接管 |
| 5 (D5) | P(1,4) | 是/否 | PWM2-CH1,默认被RT-Thread的PWM设备框架pwm2接管 |
| 6 (D6) | P(1,10) | 是/否 | |
| 7 (D7) | P(1,9) | 是/否 | PWM1-CH0,默认被RT-Thread的PWM设备框架pwm1接管 |
| 8 (D8) | P(1,8) | 是/否 | |
| 9 (D9) | P(1,5) | 是/否 | |
| 10 (D10) | P(1,1) | 是/否 | |
| 11 (D11) | P(0,26) | 是/否 | |
| 12 (D12) | P(1,3) | 是/否 | PWM0-CH3,默认被RT-Thread的PWM设备框架pwm0接管 |
| 13 (D13) | P(1,2) | 是/否 | |
| 14 (D14) | P(1,21) | 是/否 | I2C4-SDA,默认被RT-Thread的I2C设备框架i2c4接管 |
| 15 (D15) | P(1,20) | 是/否 | I2C4-SCL,默认被RT-Thread的I2C设备框架i2c4接管 |
| 16 (A0) | P(0,16) | 是/否 | ADC0-CH8,默认被RT-Thread的ADC设备框架adc0接管 |
| 17 (A1) | P(0,23) | 是/否 | ADC0-CH0,默认被RT-Thread的ADC设备框架adc0接管 |
| 18 (A2) | -- | 是/否 | |
| 19 (A3) | P(1,31) | 是/否 | |
| 20 (A4) | P(0,13) | 是/否 | I2C1-SDA,默认被RT-Thread的I2C设备框架i2c1接管 |
| 21 (A5) | P(1,14) | 是/否 | I2C1-SCL,默认被RT-Thread的I2C设备框架i2c1接管 |
| 22 (A6) | -- | | 芯片内部参考电压 ADC,默认被RT-Thread的ADC设备框架adc1接管 |
| 23 (A7) | -- | | 芯片内部温度 ADC,默认被RT-Thread的ADC设备框架adc1接管 |

> 注意:
>
> 1. xxxxxxxxx
> 2. xxxxxxxxx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Change Logs:
* Date Author Notes
* 2023-02-22 ChuShicheng first version
* 2023-02-23 Wangyuqiang second version
*/

#include <Arduino.h>
Expand All @@ -21,26 +22,28 @@
*/
const pin_map_t pin_map_table[]=
{
{D0, 50},
{D1, 49, "pwm1", 3}, /* PWM */
{D2, 57, "uart1"}, /* Serial-RX */
{D3, 28, "uart1"}, /* Serial-TX */
{D4, 39, "pwm2", 1}, /* PWM */
{D5, 40, "pwm2", 2}, /* PWM */
{D6, 37}, /* LED_BUILTIN */
{D7, 43, "pwm1", 0}, /* PWM */
{D8, 41},
{D9, 38, "pwm2", 0}, /* PWM */
{D10, 34},
{D11, 27},
{D12, 36},
{D13, 35},
{D14, 54, "pwm3", 2}, /* PWM */
{D15, 53},
{D16, 15, "i2c1"}, /* I2C-SCL (Wire) */
{D17, 14, "i2c1"}, /* I2C-SDA (Wire) */
{A0, 17, "adc0", 8}, /* ADC */
{A1, 24, "adc0", 0}, /* ADC */
{A2, RT_NULL, "adc0", 26}, /* ADC, On-Chip: internal temperature sensor, ADC_CHANNEL_TEMPSENSOR */
{A3, RT_NULL, "adc0", 13}, /* ADC, On-Chip: internal reference voltage, ADC_CHANNEL_VREFINT */
{D0, GET_PINS(1,24), "uart1"}, /* Serial2-RX */
{D1, GET_PINS(0,27), "uart1"}, /* Serial2-TX */
{D2, GET_PINS(0,15)},
{D3, GET_PINS(1,6)},
{D4, GET_PINS(1,7), "pwm2", 2}, /* PWM */
{D5, GET_PINS(1,4), "pwm2", 1}, /* PWM */
{D6, GET_PINS(1,10)},
{D7, GET_PINS(1,9), "pwm1", 0}, /* PWM */
{D8, GET_PINS(1,8)},
{D9, GET_PINS(1,5)},
{D10, GET_PINS(1,1)},
{D11, GET_PINS(0,26)},
{D12, GET_PINS(1,3), "pwm0", 3}, /* PWM */
{D13, GET_PINS(1,2)},
{D14, GET_PINS(1,21), "i2c4"}, /* I2C-SDA (Wire) */
{D15, GET_PINS(1,20), "i2c4"}, /* I2C-SCL (Wire) */
{A0, GET_PINS(0,16), "adc0", 8}, /* ADC */
{A1, GET_PINS(0,23), "adc0", 0}, /* ADC */
{A2, RT_NULL},
{A3, GET_PINS(1,31)},
{A4, GET_PINS(0,13), "i2c1"}, /* I2C-SDA (Wire) */
{A5, GET_PINS(1,14), "i2c1"}, /* I2C-SCL (Wire) */
{A6, RT_NULL, "adc0", 13}, /* ADC, On-Chip: internal reference voltage, ADC_CHANNEL_VREFINT */
{A7, RT_NULL, "adc0", 26}, /* ADC, On-Chip: internal temperature sensor, ADC_CHANNEL_TEMPSENSOR */
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Change Logs:
* Date Author Notes
* 2023-02-22 ChuShicheng first version
* 2023-02-23 Wangyuqiang second version
*/

#ifndef Pins_Arduino_h
Expand All @@ -28,18 +29,21 @@
#define D13 (13)
#define D14 (14)
#define D15 (15)
#define D16 (16)
#define D17 (17)
#define A0 (18)
#define A1 (19)
#define A2 (20)
#define A3 (21)
#define A0 (16)
#define A1 (17)
#define A2 (18)
#define A3 (19)
#define A4 (20)
#define A5 (21)
#define A6 (22)
#define A7 (23)

#define F_CPU 150000000L /* CPU:150MHz */

#define LED_BUILTIN D6 /* Default Built-in LED */

/* i2c1 : P-SDA P-SCL */
/* i2c1 : P(,13-SDA P(,14-SCL */
#define RTDUINO_DEFAULT_IIC_BUS_NAME "i2c1"

/* Serial2 : P(,27-TX P(,24-RX */
#define RTDUINO_SERIAL2_DEVICE_NAME "uart1"

#endif /* Pins_Arduino_h */
32 changes: 32 additions & 0 deletions bsp/lpc55sxx/lpc55s69_nxp_evk/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,22 @@ menu "On-chip Peripheral Drivers"
endchoice
endif

config BSP_USING_UART1
bool "Enable Flexcomm1 as UART"
default n
if BSP_USING_UART1
choice
prompt "Select UART2 badurate"
default HW_UART1_BAUDRATE_115200

config HW_UART1_BAUDRATE_9600
bool "Badurate 9600"

config HW_UART1_BAUDRATE_115200
bool "Badurate 115200"
endchoice
endif

config BSP_USING_UART2
bool "Enable Flexcomm2 as UART"
default n
Expand Down Expand Up @@ -70,6 +86,7 @@ menu "On-chip Peripheral Drivers"
config BSP_USING_I2C1
bool "Enable Flexcomm1 I2C"
default y

if BSP_USING_I2C1
choice
prompt "Select I2C1 badurate"
Expand Down Expand Up @@ -130,6 +147,21 @@ menu "On-chip Peripheral Drivers"
config BSP_USING_ADC0_CH1
bool "Enable ADC0 Channel1"
default n

config BSP_USING_ADC0_CH8
bool "Enable ADC0 Channel8"
default n


config BSP_USING_ADC0_CH13
bool "Enable ADC0 Channel13"
default n


config BSP_USING_ADC0_CH26
bool "Enable ADC0 Channel26"
default n

endif

config BSP_USING_SDIO
Expand Down