MOD54415 UART9
MOD54415 UART9
Hi,
So I am trying to use UART9 on MOD54415 and I am using NBEclipse 2.6.7. I am setting J2[41].function(2) and J2[44].function(2) and then using OpenSerial(9, 115200, 1, 8, eParityNone) to open UART9. However it seems that I am not getting anything when I use read command. The serial communication voltage level from sensor is TTL (not RS232) and I checked J2[41] with oscilloscope and I can see the pulses typical of serial communications, which means the serial signal is reaching J2[41]. Also to see if my UART9 is properly initialized I tried writing to UART9 and I can also see the signal on oscilloscope from J2[44]. What am I doing wrong? I will appreciate any help regarding this matter. Thanks in advance.
Regards,
Tanmay
So I am trying to use UART9 on MOD54415 and I am using NBEclipse 2.6.7. I am setting J2[41].function(2) and J2[44].function(2) and then using OpenSerial(9, 115200, 1, 8, eParityNone) to open UART9. However it seems that I am not getting anything when I use read command. The serial communication voltage level from sensor is TTL (not RS232) and I checked J2[41] with oscilloscope and I can see the pulses typical of serial communications, which means the serial signal is reaching J2[41]. Also to see if my UART9 is properly initialized I tried writing to UART9 and I can also see the signal on oscilloscope from J2[44]. What am I doing wrong? I will appreciate any help regarding this matter. Thanks in advance.
Regards,
Tanmay
Re: MOD54415 UART9
Hmm... Interesting. What version of the NNDK are you running? Also, is UART9 the last serial port you open? There's a bug in some of the more recent versions that can clobber the UART pins on the ones shared with the cts/rts pins of the low order ports.
-Dan
-Dan
Dan Ciliske
Project Engineer
Netburner, Inc
Project Engineer
Netburner, Inc
Re: MOD54415 UART9
I am using version 2.6.7 NNDK. Yeah it is the last serial port pins I am initializing after UART8 And UART2 but I am only opening UART9 in the code. I will try to remove other pins frm pin initialization and see if i solves the issue. However what is the possible solution to the bug? Do I need to download newer version of NNDK? Also when I checked the datasheet for Netburner I found UART8 not sharing any cts or rts with any other UART pins.
Thanks,
TM
Thanks,
TM
Re: MOD54415 UART9
The same code works with UART8!! any suggestions?
Thanks,
TM
Thanks,
TM
Re: MOD54415 UART9
Not sure what h/w your running the module in, but make sure those pins are not connected anywhere else.
Check the module data sheet and verify you are not using the alternate pin functions anywhere.
I would then make an app that is just a few lines of code to open uart9, verify you can transmit, and then see if you can read.
Check the module data sheet and verify you are not using the alternate pin functions anywhere.
I would then make an app that is just a few lines of code to open uart9, verify you can transmit, and then see if you can read.
Re: MOD54415 UART9
I checked the code and I am pretty sure that I am not using nay other function multiplexed on J2[41] but I will write a small code to just read data on UART9 and update the results. Thank you.
Regards,
TM
Regards,
TM
Re: MOD54415 UART9
Hi,
So I tried a bare code which does nothing except opening UART9 and reading incoming data but it seems it is still not working. Any other suggestions?
Regards,
TM
So I tried a bare code which does nothing except opening UART9 and reading incoming data but it seems it is still not working. Any other suggestions?
Regards,
TM
Re: MOD54415 UART9
This seems bugged... I'll take a look tomorrow. I'll either find out what you're doing wrong or what we're doing wrong.
-Dan
-Dan
Dan Ciliske
Project Engineer
Netburner, Inc
Project Engineer
Netburner, Inc
Re: MOD54415 UART9
So... I don't think this is on our end. This is the test code that I'm running:
Code: Select all
#include <predef.h>
#include <constants.h>
#include <ctype.h>
#include <ucos.h>
#include <system.h>
#include <serial.h>
#include <iosys.h>
#include <pins.h>
#include <init.h>
const char AppName[] = "UART9_TEST";
extern "C" {
void UserMain( void * pd );
}
void UserMain( void * pd )
{
init();
J2[41].function(PINJ2_41_UART9_RXD);
J2[44].function(PINJ2_44_UART9_TXD);
int fd_9 = OpenSerial(9, 115200, 1, 8, eParityNone);
// ReplaceStdio(0, fd_9);
// ReplaceStdio(1, fd_9);
// ReplaceStdio(2, fd_9);
iprintf("Application: %s\r\nNNDK Revision: %s\r\n",AppName,GetReleaseTag());
writestring(fd_9, "Starting Uart9\n");
while(1) {
fd_set read_fds;
FD_ZERO( &read_fds );
FD_SET( fd_9, &read_fds );
if (select( 1, &read_fds, NULL, NULL, 0)) {
char c;
read(fd_9, &c, 1);
while (write(fd_9, &c, 1) == 0) { }
}
}
}
Dan Ciliske
Project Engineer
Netburner, Inc
Project Engineer
Netburner, Inc
Re: MOD54415 UART9
Thanks, I am still testing but will be back soon with results.