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

Two UART example for the nRF52833 DK with SDK17.0.2 for Keil uVision

I am looking for an example where I can enable UARTE0 and UARTE1 on the nRF52833 DK.  I am using nRF5_SDK_17.0.2 with Keil uVision V5.  I am successful with the loopback example in examples > peripheral > uart > pca10100, and looking in the forums I understand that I need to use examples > peripheral > libuarte for the two UART configuration.  Could I get some guidance on how to modify the pca10056 example to work for the pca10100, and ultimately modified to enable the second UART port?  Thank you very much.

Parents
  • Hi

    Please check out this case for an easy explanation of how to port PCA10056 examples to pca10100. For a Keil project, use the .uvprojx files.

    Best regards,

    Simon

  • Thank you for the suggestion.  I tried using the working PCA10100 UART example to modify the PCA10056 libuarte example with modifying the .uvprojx file.  There are quite a few differences, and if I make too many changes I will get build errors, and trying various other combinations I can build and flash without errors, but the 52833 does not respond over the UART port.  If I flash back the the original PCA10100 example, it continues to work so I believe my toolchain and hardware setup is working.  Some questions:

    1. Is there a closer example to libuarte written for the PCA10100 that I can reference?

    2. Would using the Segger IDE instead make this process easier?

    3. What would be the best way to quickly debug the situation?

    Thanks,

    Wilbur

Reply
  • Thank you for the suggestion.  I tried using the working PCA10100 UART example to modify the PCA10056 libuarte example with modifying the .uvprojx file.  There are quite a few differences, and if I make too many changes I will get build errors, and trying various other combinations I can build and flash without errors, but the 52833 does not respond over the UART port.  If I flash back the the original PCA10100 example, it continues to work so I believe my toolchain and hardware setup is working.  Some questions:

    1. Is there a closer example to libuarte written for the PCA10100 that I can reference?

    2. Would using the Segger IDE instead make this process easier?

    3. What would be the best way to quickly debug the situation?

    Thanks,

    Wilbur

Children
  • Hi Simon,

    Thanks for the input, I currently don't see any build errors, only the PCA10100 does not respond on the UART port after up update the flash. I currently believe I just need to modify for the right settings for converting from the PCA10056 example.  Could you comment on the following settings to modify for the PCA10100?  I've tried several modifications but have been unsuccessful so far.

    From libuarte_pca10056.uvprojx
    <Cads>
    <Define> APP_TIMER_V2 APP_TIMER_V2_RTC1_ENABLED BOARD_PCA10056 BSP_DEFINES_ONLY CONFIG_GPIO_AS_PINRESET FLOAT_ABI_HARD NRF52840_XXAA __HEAP_SIZE=8192 __STACK_SIZE=8192</Define>

    <Aads>
    <MiscControls> --cpreproc_opts=-DAPP_TIMER_V2,-DAPP_TIMER_V2_RTC1_ENABLED,-DBOARD_PCA10056,-DBSP_DEFINES_ONLY,-DCONFIG_GPIO_AS_PINRESET,-DFLOAT_ABI_HARD,-DNRF52840_XXAA,-D__HEAP_SIZE=8192,-D__STACK_SIZE=8192</MiscControls>
    <Define> APP_TIMER_V2 APP_TIMER_V2_RTC1_ENABLED BOARD_PCA10056 BSP_DEFINES_ONLY CONFIG_GPIO_AS_PINRESET FLOAT_ABI_HARD NRF52840_XXAA __HEAP_SIZE=8192 __STACK_SIZE=8192</Define>

    From uart_pca10100.uvprojx that is working:
    <Cads>
    <Define> BOARD_PCA10100 BSP_DEFINES_ONLY CONFIG_GPIO_AS_PINRESET FLOAT_ABI_HARD NRF52833_XXAA __HEAP_SIZE=8192 __STACK_SIZE=8192</Define>
    <Aads>
    <MiscControls> --cpreproc_opts=-DBOARD_PCA10100,-DBSP_DEFINES_ONLY,-DCONFIG_GPIO_AS_PINRESET,-DFLOAT_ABI_HARD,-DNRF52833_XXAA,-D__HEAP_SIZE=8192,-D__STACK_SIZE=8192</MiscControls>
    <Define> BOARD_PCA10100 BSP_DEFINES_ONLY CONFIG_GPIO_AS_PINRESET FLOAT_ABI_HARD NRF52833_XXAA __HEAP_SIZE=8192 __STACK_SIZE=8192</Define>

    Note that the heap size and stack size is still 8192 for the uart_pca10100.uvprojx, while the ble_app_uart_pca10100_s140.uvprojx the heap size and stack size is 2048 from the case you referenced.  I did try both sizes.

    Thank you in advance for your assistance!

    Best regards,

    Wilbur

Related