2015-03-21 02:57 AM
Hi all,
My dear friends, I have 1 STM32 (as master) and 1 Radio Chip (as slave), here I need to read Radio chip register from STM32, can you guys please help me in do this ....I will be looking forward for your help, Thanks in advance.2015-03-24 02:41 AM
Hi,
There is a code block that reads registers of spirit1 transciever in SDK_EVAL_Spi_Driver.c. It is written below:/*** @brief Read single or multiple STS2001 register* @param cRegAddress: base register's address to be read* @param cNbBytes: number of registers and bytes to be read* @param pcBuffer: pointer to the buffer of registers' values read* @retval STS2001 status*/StatusBytes SdkEvalSpiReadRegisters(uint8_t cRegAddress, uint8_t cNbBytes, uint8_t* pcBuffer){.....}It is in the SDK EVAL libraries provided with Spirit1 (IKR002V2x) library. For example, the ''SdkEvalSpiReadRegisters'' code can be defined in MCU_Interface.h and then called in a Transmitter or Receiver system main function to read all the registers.Regards2015-04-03 01:19 AM
Hi,
first of all I would recommend to download the last SPIRIT1 DK (v2.0.0) from here:http://www.st.com/web/en/catalog/tools/PF258102 . The SPIRIT1_Libraries module (source file contained in the folderSPIRIT1 DK_2.0.0\Firmware\SPIRIT1_Library_Project\SPIRIT1_Library) is what we recommend to use in order to configure the device. To do that you can follow the application examples provided with the SDK. SPIRIT1_Library is a multi-platform module because it provides a set of functions used to convert some user - friendly input parameters (like frequencies,datarate values, enumerative types, etc.) in register values that are written to the device via SPI. Other fcn of the libs do things in the other way around, reading values from registers and traducing them in user-friendly parameters. (Please read theSPIRIT1 DK_2.0.0\Documents\SPIRIT1\Firmware_Library/SPIRIT1-Library_UM_v3.2.0.pdf doc for further details). Anyway, the library is based on a small set of APIs to drive the SPI. These 6 functions are platform dependent (of course because the SPI driver is uCdependent) and, for the STEVAL dev kits based on STM32L are contained into theFirmware\STM32L\SDK_Eval_STM32L folder. In attach an example of implementation of the SPI driver for STM32F4 (You have to remap pin and SPI peripheral for Your case). Also, You have to implement the GPIO management for this uC . I would advice to derive it from the STM32L example that You can find in the same directory. Best Regards, F. ________________ Attachments : SPI_driver_STM32F4.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Ht31&d=%2Fa%2F0X0000000aJH%2FsEWmgIcTT4vzeqMHZNI5tJIyloaiEjJ.3HcMYb4wqWI&asPdf=false