Skip to content

Commit d07de2d

Browse files
author
Daniel Campora
committed
cc3200: Move the STDIO UART pin configuration to mpconfigboard.h.
1 parent 9414f92 commit d07de2d

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

cc3200/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ make BTARGET=bootloader BTYPE=release
2929
- Make sure the SOP2 jumper is in position.
3030
- Open CCS_Uniflash and connect to the board (by default on port 22).
3131
- Format the serial flash (select 1MB size in case of the CC3200-LAUNCHXL, 2MB in case of the WiPy, leave the rest unchecked).
32-
- Mark the following files for erasing: `/cert/ca.pem`, `/cert/client.pm`, `/cert/private.key` and `/tmp/pac.bin`.
32+
- Mark the following files for erasing: `/cert/ca.pem`, `/cert/client.pem`, `/cert/private.key` and `/tmp/pac.bin`.
3333
- Add a new file with the name of /sys/mcuimg.bin, and select the URL to point to cc3200\bootmgr\build\<BOARD_NAME>\bootloader.bin.
3434
- Add another file with the name of /sys/factimg.bin, and select the URL to point to cc3200\build\<BOARD_NAME>\mcuimg.bin.
3535
- Click "Program" to apply all changes.

cc3200/boards/LAUNCHXL/mpconfigboard.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@
3737
#define MICROPY_STDIO_UART 1
3838
#define MICROPY_STDIO_UART_BAUD 115200
3939
#define MICROPY_STDIO_UART_RX_BUF_SIZE 128
40+
#define MICROPY_STDIO_UART_TX_PIN (pin_GPIO1)
41+
#define MICROPY_STDIO_UART_RX_PIN (pin_GPIO2)
42+
#define MICROPY_STDIO_UART_TX_PIN_AF PIN_MODE_3
43+
#define MICROPY_STDIO_UART_RX_PIN_AF PIN_MODE_3
4044

4145
#define MICROPY_SYS_LED_PRCM PRCM_GPIOA1
4246
#define MICROPY_SAFE_BOOT_PRCM PRCM_GPIOA2

cc3200/mptask.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ void TASK_Micropython (void *pvParameters) {
139139
#ifdef LAUNCHXL
140140
// configure the stdio uart pins with the correct alternate functions
141141
// param 3 ("mode") is DON'T CARE" for AFs others than GPIO
142-
pin_config ((pin_obj_t *)&pin_GPIO1, PIN_MODE_3, 0, PIN_TYPE_STD_PU, PIN_STRENGTH_2MA);
143-
pin_config ((pin_obj_t *)&pin_GPIO2, PIN_MODE_3, 0, PIN_TYPE_STD_PU, PIN_STRENGTH_2MA);
142+
pin_config ((pin_obj_t *)&MICROPY_STDIO_UART_TX_PIN, MICROPY_STDIO_UART_TX_PIN_AF, 0, PIN_TYPE_STD_PU, PIN_STRENGTH_2MA);
143+
pin_config ((pin_obj_t *)&MICROPY_STDIO_UART_RX_PIN, MICROPY_STDIO_UART_RX_PIN_AF, 0, PIN_TYPE_STD_PU, PIN_STRENGTH_2MA);
144144
// instantiate the stdio uart
145145
mp_obj_t args[2] = {
146146
mp_obj_new_int(MICROPY_STDIO_UART),

0 commit comments

Comments
 (0)