Facing issue on integrating UART ringbuffer example and Ethernet easyweb application

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Facing issue on integrating UART ringbuffer example and Ethernet easyweb application

619 Views
Ajeeth_kumar
Contributor I

Dear all, 

I have been working on UART using ring buffer example provided by cmsis. I was successful on configuring all four UART and got the expected output. 

Also, I tried running the Ethernet easyweb application which also worked fine for me.

The problem arises when I integrate both the UART and easweb application. 

1. On running the integrated application the the UART application will send the message once which is in while loop.

2. The connection is UP until the UART's first transmission is complete. After which both UART and Ethernet communication is down and there's no output.

Configurations I used in my applications are

1. UART - UART3 

Baudrate - 9600

Data Bits - 8bit

Parity - Even 

Stop bits - 1bit 

Interrupts are enable

Uart pins - P0.0 and P0.1

2. Ethernet 

Default configuration which was provided with easyweb application.

Edit: Target Device - LPC1768

Kindly help me with the solving this issue.

Thanks in advance 

Regards 

Ajeeth Kumar

 

0 Kudos
3 Replies

608 Views
frank_m
Senior Contributor III

There is not much detailed information to work with, but I suspect it is an interrupt/runtime issue.

I suppose all 3 UARTs and ethernet are basically handled via interrupts, probably callbacks. Keep in mind that callbacks run in interrupt context, and thus block other interrupts of the same or lower priority. And almost all UART peripherals I know stop reception when an error (like overflow) occurs. This is probably what happens in your case. And lost (overrun) ethernet transmissions will most probably break the connection-handling state machine.

You can either try to priorize your interrupt handlers (I would start with giving ethernet higher priority), or move as much time-consuming code as possible from handlers/callbacks into the "normal" user context, i.e. main loop handling.

0 Kudos

594 Views
Ajeeth_kumar
Contributor I

Dear @frank_m , 

Thank you so much for your swift response. 

I have recreated the project and the program just worked fine. I am interested in knowing that how the issue was resolved by just recreating the project. Is that something to deal with complier and linker settings ?

 

Regards

Ajeeth Kumar

0 Kudos

588 Views
frank_m
Senior Contributor III

Impossible to say from outside.

You could investigate the "failed" version, and check where and why it happened.

Recreating a project might undo modifications, change compiler settings, include/exclude conditional code, or change underlying libraries (clib).

0 Kudos