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

STM32L4 + NRF52810 on custom board serialization over UART difficulties

Hi,

I am relatively new to the Nordic family of chips and I am very impressed with the level of documentation and support available, so many thanks for that. 

I am working on trying to interface an NRF52810 with an STM32L451RxT6 on a custom board over UART (more specifically USART1 on the STM side). I am using SDK 15.2 and Segger embedded studio for programming and debugging the NRF and Atollic TrueSTUDIO on the STM32 side. 

I have confirmed that the connection between the STM and NRF is working correctly and have built a small sample application to send some data across in both directions with HW flow control (CTS/RTS) enabled. I am now at the stage where I want to run a serialized application. 

I have read all of the serialization documentation here and understand the basics about how it is supposed to work. The next task is to port the serialization library over to the STM32, which I assume is found under nRF5_SDK_15.2.0\components\serialization but please correct me if I am wrong or I am missing things from elsewhere! I think I may also need the components\softdevice and components\ble but it is not clear to me, forgive my ignorance!

I have found an example project from ST where they interface an STM32L1xx with an NRF51822 (link) which has been helpful in setting up ISRs and GPIO in the correct way on the STM; however I think that this may be leading me down the wrong path because the example is for the NRF51 family rather than 52. The layout and structure of the serialization library looks to be very different and I fear will not be compatible with the 52810. 

The example under nRF5_SDK_15.2.0\examples\ble_peripheral\ble_app_hrs\pca10040\ser_s132_uart also looks to be quite useful (different SoftDevice but the principles look applicable) which I have studied and it looks like this may be a better starting point to do the porting from. It is quite complex however and I want to make sure that I am doing the right thing first. 

If you have any advice or could guide me in the right place to look, I would be very appreciative! Or if there is a more up to date example of serialization for an STM32 that you are aware of, that would be perfect! (maybe I am being a bit too hopeful on that last point! Smiley 

Many thanks for reading!

Kind regards,

Andy

Parents
  • Hi Andy,

    Very sorry for the delayed response. If you have not seen the getting started videos playlist for SES, I would highly recommend taking a look. I am thinking out loud here, but would it be possible to use SES on the STM side too? Not sure how that would work with the license (since the other device is not a Nordic product), but it might be easier to see file dependencies that way. Just a thought.

    You are correct that the serialization files are located under sdk15_2/components/serialization. Take a look at the user include directories by right clicking on the Project -> change to the Common Configuration & click on the preprocessor tab. Then you can double click the User Include Directories tab. There, you can see all of the serialized header files that were included:

    ../../../../../../components/serialization/application/codecs/ble/serializers
    ../../../../../../components/serialization/application/hal
    ../../../../../../components/serialization/application/transport
    ../../../../../../components/serialization/common
    ../../../../../../components/serialization/common/struct_ser/ble
    ../../../../../../components/serialization/common/transport
    ../../../../../../components/serialization/common/transport/ser_phy
    ../../../../../../components/serialization/common/transport/ser_phy/config

    Good idea to look at the heart rate monitor example located it this path: nRF5_SDK_15.2.0_9412b96\examples\ble_peripheral\ble_app_hrs\pca10040\ser_s132_spi\ses. There is also an application for the S112 softdevice used in the 52810 (look at the ser_s112_hci example).

    I would recommend comparing that example with the regular HRS example located in the S132 folder. Below, you can see all of the files that were added to the regular HRS example:

    It might also be a good idea to take a look at the connectivity example located here: nRF5_SDK_15.2.0_9412b96\examples\connectivity\ble_connectivity\pca10040e

    This document that an FAE at Nordic created could be helpful too. The links reference to an older sdk v12.2, which I would not recommend using.

    The documentation tends to be placed similarly in sdk 15.2, so I would just compare the location of where each documentation file is & find the updated documentation for sdk 15.2 in the file structure menu on the left side of our Infocenter. It could be that you already read most of this documentation, but there may be something that could be helpful.

    Quick comment: The sdk v12.2 is compatible with the both the nRF51 & 52 series, so it might be useful to compare the STM32 application note AN4499 with sdk v12.2.

    Serialization Port Information V0.3.1.pdf

    I hope that helps a bit! Please let me know if you need any more help. Have a nice day!

    Kind Regards,

    Bjørn

Reply
  • Hi Andy,

    Very sorry for the delayed response. If you have not seen the getting started videos playlist for SES, I would highly recommend taking a look. I am thinking out loud here, but would it be possible to use SES on the STM side too? Not sure how that would work with the license (since the other device is not a Nordic product), but it might be easier to see file dependencies that way. Just a thought.

    You are correct that the serialization files are located under sdk15_2/components/serialization. Take a look at the user include directories by right clicking on the Project -> change to the Common Configuration & click on the preprocessor tab. Then you can double click the User Include Directories tab. There, you can see all of the serialized header files that were included:

    ../../../../../../components/serialization/application/codecs/ble/serializers
    ../../../../../../components/serialization/application/hal
    ../../../../../../components/serialization/application/transport
    ../../../../../../components/serialization/common
    ../../../../../../components/serialization/common/struct_ser/ble
    ../../../../../../components/serialization/common/transport
    ../../../../../../components/serialization/common/transport/ser_phy
    ../../../../../../components/serialization/common/transport/ser_phy/config

    Good idea to look at the heart rate monitor example located it this path: nRF5_SDK_15.2.0_9412b96\examples\ble_peripheral\ble_app_hrs\pca10040\ser_s132_spi\ses. There is also an application for the S112 softdevice used in the 52810 (look at the ser_s112_hci example).

    I would recommend comparing that example with the regular HRS example located in the S132 folder. Below, you can see all of the files that were added to the regular HRS example:

    It might also be a good idea to take a look at the connectivity example located here: nRF5_SDK_15.2.0_9412b96\examples\connectivity\ble_connectivity\pca10040e

    This document that an FAE at Nordic created could be helpful too. The links reference to an older sdk v12.2, which I would not recommend using.

    The documentation tends to be placed similarly in sdk 15.2, so I would just compare the location of where each documentation file is & find the updated documentation for sdk 15.2 in the file structure menu on the left side of our Infocenter. It could be that you already read most of this documentation, but there may be something that could be helpful.

    Quick comment: The sdk v12.2 is compatible with the both the nRF51 & 52 series, so it might be useful to compare the STM32 application note AN4499 with sdk v12.2.

    Serialization Port Information V0.3.1.pdf

    I hope that helps a bit! Please let me know if you need any more help. Have a nice day!

    Kind Regards,

    Bjørn

Children
No Data
Related