Hi all -
I've recently begun working with an Xplained Pro evaluation board, and an Atmel example project (LwIP Example). A call in main() to printf() is hanging. Evidently, the routine:
static int32_t usart_sync_write(struct io_descriptor *const io_descr, const uint8_t *const buf, const uint16_t length)
is hanging on this line:
while (!_usart_sync_is_transmit_done(&descr->device)) ;
looking down into the HRI, I find this:
return (((Sercom *)hw)->USART.INTFLAG.reg & SERCOM_USART_INTFLAG_TXC) >> SERCOM_USART_INTFLAG_TXC_Pos;
evidently is never returning true.
The stock LwIP example works (printf() is fine), but my (slightly modified) version does not. The changes I've made are based on enabling DHCP and sockets.
Backing out my changes is a little messy, as I've had to make quite a few modifications here and there to get the program to build, so I was hoping that someone here could offer a more heuristic approach to figuring out what I've done wrong.