 
Nope Recommended SPI Pins for #PineCone #BL602 also don't work
https://github.com/lupyuen/bl_iot_sdk/blob/spi/customer_app/sdk_app_spi/sdk_app_spi/demo.c#L49-L67
Testing the Recommended SPI Pins for #BL602 #PineCone @ThePine64
https://wiki.pine64.org/wiki/Nutcracker#Pinenut-12S_Module_information
#PineCone and #Pinenut #BL602 recommended SPI Pins ... Let's try them
https://wiki.pine64.org/wiki/Nutcracker#Pinenut-12S_Module_information
...Or use a real Logic Analyser ... To debug the #BL602 SPI Bus? 🤔
https://www.seeedstudio.com/LA2016-Logic-Analyzer-p-2218.html
Contemplating my Life Choices ... Erm whether I should use #BusPirate to sniff the #BL602 SPI Bus 🤔
Aha #BL602 SPI DMA is now Transmitting AND Receiving! The SPI Mode was incorrect ... Got confused between the AliOS docs and the BL602 implementation 🙁
Received SPI Data is garbage though 🤔
https://github.com/lupyuen/bl_iot_sdk/blob/spi/customer_app/sdk_app_spi/sdk_app_spi/demo.c#L49-L67
#BL602 SPI DMA uses a Linked List of DMA requests ... Let's dump the DMA Linked List and verify the SPI Transmit and Receive requests
https://github.com/lupyuen/bl_iot_sdk/blob/spi/components/hal_drv/bl602_hal/hal_spi.c#L160-L199
#BL602 SPI Transmit seems OK but not SPI Receive ... After calling "hal_spi_init" 🤔
https://github.com/lupyuen/bl_iot_sdk/blob/spi/components/hal_drv/bl602_hal/hal_spi.c#L826-L876
These 2 #BL602 SPI Functions are begging me to call them ... Phew this SPI HAL is confusing 🤔
https://github.com/lupyuen/bl_iot_sdk/blob/spi/components/hal_drv/bl602_hal/hal_spi.c#L405
Commented out the waiting for #BL602 SPI DMA ... Yep no more hanging ... But no SPI Data received. Interrupt Counters show that DMA Interrupts weren't triggered.
The plot thickens ... Just like my chicken soup 🤔
https://github.com/lupyuen/bl_iot_sdk/blob/spi/components/hal_drv/bl602_hal/hal_spi.c#L285-L353
"hal_spi_dma_trans" hangs while doing #BL602 SPI DMA transfer because it's waiting for a FreeRTOS Event Group ... Which is supposed to be signalled by the DMA Interrupt Handler. Let's comment out the waiting and see what happens...
https://github.com/lupyuen/bl_iot_sdk/blob/spi/components/hal_drv/bl602_hal/hal_spi.c#L285-L348
#BL602 SPI DMA Transfer is hanging inside "hal_spi_dma_trans" ... According to the debug log 🤔
 
https://github.com/lupyuen/bl_iot_sdk/blob/spi/components/hal_drv/bl602_hal/hal_spi.c#L472-L510
Our #BL602 SPI program hangs when doing data transfer 🤔
https://github.com/lupyuen/bl_iot_sdk/blob/spi/customer_app/sdk_app_spi/sdk_app_spi/demo.c
#BL602 SPI Transmit and Receive ... Hope this works 🤔
https://github.com/lupyuen/bl_iot_sdk/blob/spi/customer_app/sdk_app_spi/sdk_app_spi/demo.c#L72-L102
IoT Techie and Educator / Apache NuttX PMC