Because of the use of lines for other things, i need to access UART 8 and 9. UART 8 works exactly as expected but U( does not.
UART 9 is connected to the CAN tranceiver. I have removed this device so ther is no conflict.
When I execute the command
RF_FD = OpenSerial( 9, 9600, 1, 8, eParityNone );
the UART9 TX pin (P3 pin 5) should go to a high logic level but it stays at zero.
When I execute the same command on UART8
RF_FD = OpenSerial( 8, 9600, 1, 8, eParityNone );
the UART8 TX pin (P3 pin 12) goes to a high logic level as expected.
Can anyone suggest why UART 9 may not be working.
By the way, I also checked data with both a scope and a loop back test.
RF_FD = OpenSerial( 9, 9600, 1, 8, eParityNone );
writeall( RF_FD, (char *)txd, PACKET_LENGTH );
OSTimeDly(10);
read_nbr = ReadWithTimeout(RF_FD, (char *)rxd, PACKET_LENGTH, 3);
does not provide any data when a short is put across P3 pins 3 and 5 while the exact same code (but using UART8) works perfectly in the loop back test when i short P3 pins 12 and 14.
Is there something in the CAN library that needs to be disabled?
Thanks
Lachlan
UART 9 not working on Nano
-
- Posts: 14
- Joined: Fri Jun 08, 2012 4:59 am
Re: UART 9 not working on Nano
U8 & 9 does work fine as long as you remove U7 from the kit.
fds9=SimpleOpenSerial(9,115200);
writestring(fds9,"Hello World");
fds9=SimpleOpenSerial(9,115200);
writestring(fds9,"Hello World");
Re: UART 9 not working on Nano
did you set U9 for serial first ?
// Configure COM 9 Pins as Primary Function
Pins[20].function(PIN_20_UART9_RXD );
Pins[22].function(PIN_22_UART9_TXD);
// Configure COM 9 Pins as Primary Function
Pins[20].function(PIN_20_UART9_RXD );
Pins[22].function(PIN_22_UART9_TXD);
Re: UART 9 not working on Nano
Thanks that works. So easy when you know how.
Interesting that I did not have to do that for U8. I preseumed the SerailOpen function set that up. Apparently not.
Thanks again.
Regards
Lachlan
Interesting that I did not have to do that for U8. I preseumed the SerailOpen function set that up. Apparently not.
Thanks again.
Regards
Lachlan