Skip to content

Serial callbacks with STM327H7 panic #10935

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

Closed
frmdstryr opened this issue Jul 1, 2019 · 2 comments
Closed

Serial callbacks with STM327H7 panic #10935

frmdstryr opened this issue Jul 1, 2019 · 2 comments

Comments

@frmdstryr
Copy link

frmdstryr commented Jul 1, 2019

Description

Any attempt to use serial callbacks do not work. Using serial without callbacks work fine.

  • What target does this relate to?
    NUCLEO-H743ZI

  • What toolchain (name + version) are you using?
    mbed-os-5.4.0-rc1-15146-gb0073bb70d

  • What tools (name + version - is it mbed-cli, online compiler or IDE) are you using?
    mbed-cli 1.10.0

  • What is the SHA of Mbed OS (git log -n1 --oneline)?
    b0073bb70d (HEAD -> master, origin/master, origin/HEAD) Merge pull request #10774 from fkjagodzinski/fix-uart_irq

  • Steps to reproduce.

Use this code

#include "mbed.h"

DigitalOut led1(LED1);
DigitalOut led2(PE_1); // LED2 is PE_1 on v2 of this board
DigitalOut led3(LED3);
Serial serial(USBTX, USBRX, 115200);

void on_data() {
    led1 = !led1;
    while (serial.readable()) {
        serial.putc(serial.getc());
    }
}

int main() {
    serial.attach(&on_data);

    while (1) {
        led2 = !led2;
        led3 = !led3;
        wait(0.5);
    }
}

Open the port and an send any character. It will dump this error


++ MbedOS Error Info ++
Error Status: 0x80010133 Code: 307 Module: 1
Error Message: Mutex: 0x200019A4, Not allowed in ISR context
Location: 0x8002587
Error Value: 0x200019A4
Current Thread: rtx_idle  Id: 0x20001264 Entry: 0x8002595 StackSize: 0x300 StackMem: 0x200015A8 SP: 0x2001FEB8 
For more info, visit: https://mbed.com/s/error?error=0x80010133&tgt=NUCLEO_H743ZI
-- MbedOS Error Info --

= System will be rebooted due to a fatal error =
= Reboot count(=1) reached maximum, system will halt after rebooting 

Edit: It appears to be similar to #3452

Issue request type

[ ] Question
[ ] Enhancement
[X] Bug
@0xc0170
Copy link
Contributor

0xc0170 commented Jul 1, 2019

Similar to this one #10906, use RawSerial

@frmdstryr
Copy link
Author

Thanks, that works!

If I remove the while loop it seems to keep calling the irq in a loop, why is this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants