Bad Definitions in sam4e_ek.h... PIO_PA6C_URXD1 wrong!

Discussion around product based on ARM Cortex M4 core.

Moderators: nferre, ncollot

scowell
Posts: 29
Joined: Fri Feb 13, 2015 11:00 pm

Bad Definitions in sam4e_ek.h... PIO_PA6C_URXD1 wrong!

Wed Apr 22, 2015 8:12 pm

I changed my project over to uart1 from uart0, since I'm using pDMA and uart1 is on a different channel (you can't have two things on the same channel active at the same time).

Lo and behold... I found that the pin definitions for uart1 were reversed... lines 108 and 112 contain the reversed definitions. As is apparent from the pdf, datasheet section 37.4.1, pin pa5 is RX, pin pa6 is TX. The header file gives the follwing:

#define PINS_UART1 (PIO_PA6C_URXD1 | PIO_PA5C_UTXD1)


and in fact it won't compile unless you un-reverse it. Not sure how it compiled in the first place!

Return to “SAM4 Cortex-M4 MCU”

Who is online

Users browsing this forum: No registered users and 2 guests