Skip to content

Fix of Buffered Serial RX/TX crash problem on REALTEK_RTL8195am #9923

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

AdamZhang0124
Copy link
Contributor

This PR addresses the issue of #8081.
It removes 'interrupt disable' in 'serial_loguart_irq_handler' function in "serial_api.c".

Description

  1. Remove 'log_uart_irq_set' to avoid interrupt being untimely disabled in buffered serial mode.

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

Release Notes

Remove the interrupt disable function to fix the logUART rx error when inputting multiple characters simultaneously in buffered serial mode.
@ciarmcom
Copy link
Member

ciarmcom commented Mar 4, 2019

@AdamZhang0124, thank you for your changes.
@samchuarm @ARMmbed/mbed-os-maintainers please review.

@SeppoTakalo
Copy link
Contributor

This cannot be verified anymore.
RTL9196AM cannot be build against Mbed OS master.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 11, 2019

Good point!

@AdamZhang0124 Are you planning to re-enable MCU_RTL8195A ? Without it, we can't even build this fix.

@AdamZhang0124
Copy link
Contributor Author

Good point!

@AdamZhang0124 Are you planning to re-enable MCU_RTL8195A ? Without it, we can't even build this fix.

I didn't disable MCU_RTL8195A. Our target seems to be excluded after the release of 5.12 SHA-1: 63dd5cb, but we did not receive any notice about this before the release.
Is it because of the issue of IAR 8 library update #9206 ? But how come the IAR update issue would affect the ARM and GCC_ARM compilers?

@cmonr
Copy link
Contributor

cmonr commented Mar 11, 2019

@samchuarm
Copy link

Hi, Adam@Realtek is re-building the libraries for RTL8195AM to support IAR8. He'll submit a PR to the master with the updated libraries once it's done. This PR can only be processed until MCU_RTL8195A is re-enabled.

Some background info. Realtek did submit a PR to include updated libraries for IAR8 support via below PR but for some reason that was not finished and lost in the pond.
#5520

@cmonr
Copy link
Contributor

cmonr commented Mar 27, 2019

@AdamZhang0124 @samchuarm Would there happen to be any updates to share?

@AdamZhang0124
Copy link
Contributor Author

@AdamZhang0124 @samchuarm Would there happen to be any updates to share?

Hi @cmonr ,
The library update for IAR 8.32 has been made. We are now troubleshooting the "Sync_failed" issue which happens while running greentea test with the new library.
It would be very helpful if you happen to know some possible causes of this issue. Thanks.

@cmonr
Copy link
Contributor

cmonr commented Mar 28, 2019

@AdamZhang0124 Do you have a full test log that could be used to debug the problem?

@AdamZhang0124
Copy link
Contributor Author

@AdamZhang0124 Do you have a full test log that could be used to debug the problem?

Yes, this is the newest full test log that I ran yesterday for your reference.
IAR_GTtest_270319.txt

@cmonr
Copy link
Contributor

cmonr commented Mar 28, 2019

@flit @brianesquilona Would y'all know of any way to help out here?

@AdamZhang0124 Is this only an IAR issue?

@flit
Copy link

flit commented Mar 28, 2019

What is the problem? I can't parse anything out of the log file…

@cmonr
Copy link
Contributor

cmonr commented Mar 28, 2019

@flit @brianesquilona Sorry, I may have jumped the gun a bit.

@AdamZhang0124 It looks like the target is hard faulting after attempting to initialize

SDR Controller Init

Are you also aware that this is being printed? Is this normal?

RTL8195A[ToolChain Version: gcc version 4.8.3 (Realtek ASDK-4.8.3p1 Build 2003)

@studavekar
Copy link
Contributor

The library update for IAR 8.32 has been made. We are now troubleshooting the "Sync_failed" issue which happens while running greentea test with the new library.

From the logs we see lot of hard faults Hard Fault Error!!! from bootloader bin probably

RTL8195A[HAL]: Hard Fault Error!!!!
[1553657736.89][CONN][RXD] 

RTL8195A[HAL]: R0 = 0xd6
[1553657736.89][CONN][RXD] 

RTL8195A[HAL]: R1 = 0x0
[1553657736.89][CONN][RXD] 

RTL8195A[HAL]: R2 = 0x1000507c
[1553657736.89][CONN][RXD] 

RTL8195A[HAL]: R3 = 0x0
[1553657736.89][CONN][RXD] 

@AdamZhang0124 can you please confirm if blinky is working with library update to IAR 8.32 ?

@AdamZhang0124
Copy link
Contributor Author

Hi @studavekar ,
The blinky example is not working. It is able to be compiled by IAR 8.32, but after copying the binary file to the device, it results with "transfer timed out" error.
IAR_blinky.txt
FAIL.TXT

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 12, 2019

@AdamZhang0124 If you are still having issues, create a new issue.

This fix shall be closed until realtek MCU is reenabled (can be tested).

@AdamZhang0124
Copy link
Contributor Author

@AdamZhang0124 If you are still having issues, create a new issue.

This fix shall be closed until realtek MCU is reenabled (can be tested).

Hi @0xc0170 , for your information, the issue #9206 that blocks the device from compiling is still in progress. Thanks!

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 3, 2019

I propose to close this PR and reopen with an update. Please do once this is unblocked.

@0xc0170 0xc0170 closed this Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants