This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf52832 UART and SPI configuration

Hi I'm using the nrf52832 and want to send datas via UART and SPI but the PSI example Show different Settings of UART then the BLE_APP_UART. The BLE_APP_UART is running well but how can I implement then the SPI Interface. thanks in advance for help

Maybe you can send me an example code which is clear for me.

thanks in advance

Parents
  • Hi

    As Andrew is asking. What exact settings are you worried about? There are no UART settings in the SPI main file, and if you refer to the sdk_config configurations you should put enable the ones in the SPI examples config file in the UARTs config file, and implement the defines that are not there. Be careful not to make multiple of the same definitions in the config file though, as this might cause errors or unexpected output.

    The main file you should be able to pretty much copy paste as long as you put it in the right order, i.e. the defines first, the inits before the main, and the actual main loop inside the one you already have in a way that makes sense. 

    You must also remember to include header files and the required .c files from the SPI example into your project.

    Best of luck and kind regards,

    Simon

Reply
  • Hi

    As Andrew is asking. What exact settings are you worried about? There are no UART settings in the SPI main file, and if you refer to the sdk_config configurations you should put enable the ones in the SPI examples config file in the UARTs config file, and implement the defines that are not there. Be careful not to make multiple of the same definitions in the config file though, as this might cause errors or unexpected output.

    The main file you should be able to pretty much copy paste as long as you put it in the right order, i.e. the defines first, the inits before the main, and the actual main loop inside the one you already have in a way that makes sense. 

    You must also remember to include header files and the required .c files from the SPI example into your project.

    Best of luck and kind regards,

    Simon

Children
Related