espressif / esp-hosted

Hosted Solution (Linux/MCU) with ESP32 (Wi-Fi + BT + BLE)
Other
710 stars 170 forks source link

Empty buffers on init sequence.MCU Host demo it's stuck #61

Closed mluisPlux closed 3 years ago

mluisPlux commented 3 years ago

I'm trying out your MCU Host demo and it's stuck here: image

I'm using a ESP32-C3 and a ST32F7 board. I'm doing the debug using the Cube IDE and the buffers being sent are empty. image Do you know what might be happening?

mluisPlux commented 3 years ago

I was able to pass this point but it's not being able to send/read commands. image The HandShake anda DATA_READY pins are not going high so the ST does not send the commands.

starkeeper82 commented 3 years ago

Have you used the correct pins? Pinning on C3 and S2 is different. And as far as I remember the sample code does not contain the initialization for the STM32 pins.

mantriyogesh commented 3 years ago

Hello @mluisPlux ,

tx buffer should not be anytime NULL. They can have 'dummy' transaction but always some valid allocated memory. Can you please check if the malloc is failed / heap is insufficient? Can increase the heap in that case.

We will also try to reproduce this issue at our end. Will update further.

mluisPlux commented 3 years ago

@mantriyogesh @starkeeper82 Hello, In the ESP32-C3 i use the recommended pins, in the STM32 i had to make a custom configuration for my board. The heap at the ST is at the max size. I'm able to receive the first message on the ST with if_type 4 and it initializes the control path. But then the HANDSHAKE and DATA_READY pins go LOW and stay that way so no more transactions are made an i can't pass the point showed on my last comment. https://github.com/espressif/esp-hosted/issues/61#issuecomment-926521137 Before first transaction: image First message received: image Writes buffer to send message: image ESP32 pins are LOW: image

mluisPlux commented 3 years ago

Any news on this @mantriyogesh ?

mantriyogesh commented 3 years ago

Hello @mluisPlux I had tested over commit 08a6de0ac9db898839eb8f06a102fe6ad49b5887

C3 is working fine. Could you please check if SPI connections are correct?

mantriyogesh commented 3 years ago

there is some problem over master, that we are addressing now. By the time could you please try above commit?

Ideally this commit should just work out of the box. If this doesn't get proceed, can you please try changing handshake pin?

mluisPlux commented 3 years ago

I will try this out. But that commit is related to Linux based host, i am working on a STM32H7 MCU host.

mantriyogesh commented 3 years ago

Any commit before 54f5d2e47d0c5a837e26a613cdf590cf94d9ded9 you can use.

mantriyogesh commented 3 years ago

Now issue is fixed over master. Please resync to master and try again..

mluisPlux commented 3 years ago

Thank you @mantriyogesh it seem's to be working for now.