esp32-spi-message-demo icon indicating copy to clipboard operation
esp32-spi-message-demo copied to clipboard

Questions: Enabling SPI peripheral mode

Open nicolethai opened this issue 4 years ago • 4 comments

Hi, I'm attempting to interface the BW1098EMB_R0 development kit with an MCU. I'm using the ESP32 SPI messaging demo as a guide, and am looking for clarification to a couple questions:

  • The bootloader and pipeline were flashed following the sample in depthai-core. With the configurations SPI Mode 0 and 500kHz/1MHz/4MHz clock, sending a request to grab available streams or request data will result in no response from the module. Is there something that I may have overlooked setting up for SPI communication?
  • There were also steps to update the firmware for SPI peripheral mode using dfu-util — In trying to update the firmware, running ‘-build’ for depthai.py aborts after device reset and the package fails to build. Is it correct to assume the depthai_flash.fw be generated successfully here? Also, if I want to enable other GPIO, how do I update the firmware for that?

Thank you!

nicolethai avatar Jan 28 '21 02:01 nicolethai

Hi @nicolethai ,

Sorry for the trouble here.

To help debug, would you be able to share your physical pin-configuration to the microcontroller (and if possible, which microcontroller is being used)? Ideally a picture of the setup would help a lot.

In terms of enabling additional IO - do you mean IO on the Myriad X? If so, we plan to support that later through microPython, but this effort is in its infancy right now (latest here).

Also I wanted to make sure you are aware of the DepthAI + Onboard ESP32 board: https://shop.luxonis.com/collections/all/products/bw1092

I bring this up as since everything is wired onboard, it helps to sanity-check if something is not working because of physical wiring configuration (like a missing ground between the boards) sort of thing.

Thoughts?

Thanks, Brandon

Luxonis-Brandon avatar Jan 28 '21 02:01 Luxonis-Brandon

Hi Brandon,

I'm trying it with the Atmel SAM V71 Xplained Ultra evaluation kit, hope the picture attached helps. For the SoM, would it simply be flashing the pipeline as needed? IMG_9943

For additional IO, I saw that UART and I2C were broken out on the development kit but I was not sure if/how they were being used. I believe those are from the SoM on board, would that be driven through microPython?

And thank you, I was aware of the BW1092 board and was trying to reference the available schematics.

Thanks again

nicolethai avatar Jan 28 '21 03:01 nicolethai

Hi @nicolethai

I wonder if the depthai.cmd doesn't line up correctly with what the esp32-spi-message-demo is expecting. Just to be sure you know about them, we have some depthai examples that correspond with esp32-spi-message-demo here:

https://github.com/luxonis/depthai-experiments/tree/master/gen2-spi

You can pull down the right depthai.cmd firmware by running the install_requirements.py script in the link above. Then by running one of the example's main.py, you'll end up starting the updated firmware.

jonngai avatar Jan 28 '21 04:01 jonngai

For additional IO, I saw that UART and I2C were broken out on the development kit but I was not sure if/how they were being used. I believe those are from the SoM on board, would that be driven through microPython?

Yes, that's exactly right. We think we have a good path to microPython, and I think it should work well. We just keep getting pulled by pressing customer matters. I think February will be a good month for microPython though.

Luxonis-Brandon avatar Jan 28 '21 04:01 Luxonis-Brandon