www.beck-ipc.com
www.beck-ipc.comwww.beck-ipc.com  | ImprintImprint
FAQFAQ  | SearchSearch  |
RegisterRegister   |LoginLogin

uart6 working only in one direction

Questions and discussions about the operating system RTOS-LNX and the corresponding C-LIB.
Hello,

on our board we have another issue of UART6 not working in reception mode. We are using UART6 either as RS232 or RS485 mode by hardware links. In both the cases, whatever is transmitted by the board is received on the PC terminal,but the reverse is not true.
The program running on SC145 does not receive anything ,where as on CRO we see the received data as waveform on pin 9 ( RXD6/I2CCLK1) of SC145.

Also, the programs being run are tested and working OK for other UART5 ( Rs485) and UART3(RS232).

What could be the possible reason of this one way behaviour ? Any setting required in CHIP.INI or OS upgrade is required ?

..Sharmila

Hello Sharmila,

I did a test on the DB150. I connected RXD6 und TXD6 through a jumper to receive the echo of what is sent.
This did work well. So I would exclude some pin setup problem inside the RTOS-LNX.
I've tested with the RTOS-LNX V1.20. However, I did not find anything about a UART6 problem in our release-notes or internal logs, so assume that it should also work with V1.18 or V1.19, which you are using.

So far I have no idea what could be the problem.

Best regards,
André Pribil
Software Development
Beck IPC GmbH

can you please send your test code for DB150 /uart6 ? Any settings in chip.ini ?

Sure.

Code: Select all
int main (void)
{
  unsigned char sendBuf[] = "Test";
  unsigned char recvBuf[10];
  int i, result;

  printf("Enable UART6, 115200 8N1\n");
  fossil_init(FOSSIL_UART6);
  fossil_setbaud(FOSSIL_UART6, 115200, FOSSIL_PARITY_NO, 8, 1);

  printf("Sending over UART6\n");
  fossil_writeblock(FOSSIL_UART6, sendBuf, sizeof(sendBuf) - 1);

  RTX_Sleep_Time(10);

  result = fossil_readblock(FOSSIL_UART6, recvBuf, sizeof(recvBuf));
  printf("fossil_readblock() result = %d\n", result);
  for (i=0; i<result; i++)
  {
    printf("recvBuf[%d] = %c, %02Xh\n", i, recvBuf[i], recvBuf[i]);
  }

  return 0;
}


Regards,
André Pribil
Software Development
Beck IPC GmbH

So Here are some observations.

1> I re-tested your's as well as our code on DB150 for uart6 with tx-rx jumper conencted.(X6 connector). Your code ran successfully where as our code did not recive anything,but indicated transmission was done.

The only difference between both the codes were. fossil init API.
Your code has used the legacy API fossil_init(PORT) and we had used fossil_initmode(port,false,true,true).

We had kept the tx,rx DMAflags to true as per the fossil_API documentation on website as noted below.

Note :
Sending and receiving via DMA is currently only supported by the SC1x5. However, the DMA mode on the SC1x5 cannot be selected independently for send and receive. Regardless whether the txDMA or rxDMA parameter is set to TRUE, the DMA mode will be activated for send AND receive.
Since Since
V0.80
Changes:
V1.14 - Add DMA mode


2> so in our code when we made the fossil_initmode tx,rx DMA flags to false, the code worked successfully on DB150 as well as on our hardware.

3> But interestingly, the tx,rx DMA flags are true for UART3,UART5 in our code and works ok for them on both the boards, but not for UART6. What must be causing this diffrent behaviour ? Our RTOS version on DB150 is v1.19 beta,which you had previously sent and our hardware is having v1.18.



4> Also, After bootup, for the first time when port-uart6 is opened with DMA flags false, false, then only comm with UART6 works.

Sometimes, after this even the uart6 is opened with true,true DMA flags, it might work. NOT sure of this though..very random behaviour.

5> but certianly if after bootup, for the first time when port-uart6 is opened with tx,rx DMA flags true then comm with UART6 does not work at all. Even when later, tried to open with flase DMA flags, it does not work without booting . It needs then powercycling .


Can you please tell the reason behind this different behaviour of UART6 from the rest of UARTs?


..sharmila

Hello,

looks like you discovered a kernel problem with UART6 rx DMA.

Please use the IRQ mode until we found the reason.

Regards,
André Pribil
Software Development
Beck IPC GmbH

OK. Will wait for your update.

Meanwhile can we load the latest RTOS release v1.20 on our board ?

The upgrade procedure must be same, though the hardware description for our board is different from DB150.

Can you confirm ?

Regards,
..Sharmila

Hello,

the UART6 RX DMA problem will be fixed with the next RTOS-LNX release.

Yes, you should be able to update the RTOS-LNX on your board in the same way as on the DB150.

Regards,
André Pribil
Software Development
Beck IPC GmbH

Just to confirm and to be on safer side , can I also downgrade to version 1.18 from 1.20 ,too, without any issues.

..sharmila

Yes, a downgrade is still possible.

Regards,
André Pribil
Software Development
Beck IPC GmbH

I also can't find RTOS-LNX v1.18 on the website. Can you send it please ?

..Sharmila

I sent it via email.

Regards,
André Pribil
Software Development
Beck IPC GmbH

Return to RTOS-LNX


Who is online

Users browsing this forum: No registered users and 2 guests


cron