- Silicon Labs Community
- Welcome and Announcements
- Silicon Labs Knowledge Base
- 8-bit MCU
- 32-bit MCU
- Bluetooth / Wi-Fi
- Other Products Category
- Optical/RH/Temp Sensor
- Other Products
- Hardware and Software Tools
- Simplicity Studio and Software
- General Discussions and Suggestions
- Chinese Forum
- Software Libraries
- Development Kits
- Reference Designs
- Third Party Tools
- White Papers
- Official Blog of Silicon Labs
- Chinese Blog
10-06-2017 07:13 PM
Hardware configurator and SPI with spidrv.h - how does it all work together?
I have EFR32BG1P233F256GM48 and when I run hardware configurator, there is an option to set USART1 to synchronous SPI mode. It then generates some code in InitDevice.c to initialize USART1_enter_DefaultMode_from_RESET(). But there doesn't seem to be any connection with the code in spidrv.h and spdrv.c or how it can be used / how it all knits together.
Is there a tutorial for all of this being setup together? (I found some things about spidrv - but as a noob to this chip, its all a bit confusing about how that relates to using the hardware configurator and pin assignments and so on. I can make USART1 work as RS232 no problem with hardware configurator.)
10-09-2017 10:29 AM
For an example of using the SPI driver for the EFR32BG1P233F256GM48 you could look at the Gecko Bootloader EZSP SPI Bootloader software example project. I do not know if you are using a Silicon Labs WSTK and radio board to get familiar with the chip or not. If that project doesn't show up for you, then try adding the BGM111 Bluetooth Module Radio Board (BRD4300A) to the "Solutions" window and it will show up for that board.
Also application notes AN0008 and AN0013 come with a zip file with example projects on them and they have examples of using the SPI port.
The Hardware Configurator will configure the pins of the chip for the USART SPI functionality, it does not create additional calls into the SPI driver.
I hope this information is helpful to you.
10-09-2017 02:38 PM
Thank you very much for that answer.
I needed to know clearly that the Hardware Configurator will configure the pins of the chip for the USART SPI functionality, and that it does not create additional calls into the SPI driver - so all of those operations are done manually. I can work with that answer.
Thank you for the pointers to example projects. Between all that information, I should be able to get something going.