SparkFun Forums 

Where electronics enthusiasts find answers.

Topics pertaining to the Arduino Core & software used with the Artemis module and Artemis development boards.
By stephenf
#213551
I guess the main purpose of this post is to warn anyone having difficulty getting obscure pin function combinations to work, that there may be errors in the core code defining errors for Serial0, Serial1, I2C, SPI, etc.

I've been trying to set Serial1 to work on pads 9 (RX) and 10 (TX), and I narrowed it down to pad 10 not functioning as TX1. Assigning the port to other pins worked fine (test code below - uses an FTDI plugged into a separate COM port and viewed in Termite serial monitor).

I dug into the core code, found 4 omissions plus 2 typos and made (untested) fixes to files:
- ap3_uart_structures.c
- am_hal_pin.h
- ap3_uart_types.h
I've double checked and fixed all the assignments for UART0 and UART1 against the pin mapping Table 559 of the Apollo3 Blue datasheet, and a pull request is pending. Couldn't quite bring myself to do the same for SPI/I2C/others at this stage.

[b]Unfortunately, TX1 still doesn't work on pad 10, so I'm a bit stumped. Any ideas?[/b]

Test code (worked successfully on Nano, Redboard and my custom board, I really need to get an ATP for stuff like this though - remember if using pad numbers instead of pin numbers, to select board "Artemis ATP" and cross-reference the schematic for the pad numbers vs pin numbers)
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum