This posting is for people who may be going through what I have been through in the past few days while trying to receive serial data via UART2 on the MC1322x Network Node dev board.
The problem: Using a project which was exported from BeeKit, I am trying to make use of UART2 via GPIO pins and using the LCD display at the same time. However, the Rx interupt for UART2 is never triggered. The result - I can transmit data via UART2, but cannot receive. Frustrating.
The solution: After confirming that TTL logic is being correctly applied to GPIO pin 18 (UART2Rx) and going through all docs and online resources (including this forum) I found that by flashing the Network Node board with a project targeted for the Low Power board, the UART2 Rx interupt was able to be triggered! That rules out a hardware problem - phew!The difference is that in the LP board instance the LCD is never initialised (because the target is the LP board which does not have an LCD). So, after confirming that the LCD is interferring with the UART2Rx somehow, I looked into why. I found that as part of the LCD init routine (PLM\Source\Display\display.c), the GPIO pin for UART2Rx is being used for some sort of LCD control. The defined constant name for this pin for the LCD init routine is LCD_RSTN_debug. I changed it from being defined as GPIO bit 19 to being defined as GPIO bit 17 (not part of UART2) and UART2 Rx works now! Yay!
Questions for Freescale:
* What is LCD_RSTN_debug and what is it used for?
* Does it *need* to be defined as GPIO bit 19 for any particular reason?
* What is the deal with the GPIO numbering here? UART2Rx is defined as GPIO pin 18, a bit reference would be one number less (ie bit 17), but the LCD init module references GPIO 19 which causes a conflict with UART2Rx. The inline comments state that GPIO 19 is UART2_RX, but this just doesn't make a lot of sense to me. What am I missing here?