Xinyuan-LilyGO / LilyGO-T-SIM7000G

LilyGO T-SIM7000G
https://pt.aliexpress.com/item/4000542688096.html
284 stars 123 forks source link

Calling xSemaphoreGiveFromISR() wihtout real device connection can be stuck..? #200

Closed vkcorp closed 1 year ago

vkcorp commented 1 year ago

I'm using "miwagner/ESP32-Arduino-CAN" to communicate my device with TSIM7000G (by CAN), but I found a strange thing. If I use it without connecting the real device it can be stuck at below point. Strange to say, it's stuck at second calling it.

int CAN_write_frame(const CAN_frame_t *p_frame) { xSemaphoreTake(sem_tx_complete, portMAX_DELAY);

https://github.com/miwagner/ESP32-Arduino-CAN/blob/master/src/CAN.c

First time it can be return and second time I coudln't get my log. After tracking the codes, actually xSemaphoreGiveFromISR() woudn't provide "sem_tx_complete" any more. Like a deadlock from xSemaphoreTake() ?

Does this xSemaphoreGiveFromISR() can't be called without real device connection ?

vkcorp commented 1 year ago

I will use old one (without calling xSemaphoreGiveFromISR)