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

Configuration UARTE with nrf52805 for ESB - Part 2


My previous ticket is closed. I would need, but still help with the configuration of the pins. I report my last post.

Hello,
I did some tests with the oscilloscope directly connected to pins 21 and 18 of the nrf52805.
The transmission on pin 18 by the Stm8l works perfectly. The problem I encounter now is that nrf52805 I have the pull up instruction on this pin

 nrf_gpio_cfg_input(PIN_RXD,GPIO_PIN_CNF_PULL_Pullup);

but nothing happens when oscilloscopes.
It could be that I get the pin definition wrong initially

 #define UARTE_BASE           0x40002000
  #define PORTA_UARTE          ((NRF_UARTE_Type *) UARTE_BASE )
  #define PIN_TXD            21
  #define PIN_RXD            18


or the pull up configuration of pin 18, set as input and pin 21 as output?

 nrf_gpio_cfg_input(PIN_RXD,GPIO_PIN_CNF_PULL_Pullup);
     nrf_gpio_cfg_output(PIN_TXD);
  • Thank you,I entered the missing part of the code, but now build the project returns an error trying to compile the single file instead does not happen. The libraries required by the file.c are all imported correctly
    C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.44/gcc/arm-none-eabi/bin/ld: Output/Release/Obj/esb_ptx_pca10040/app_uart_fifo.o: in function `uart_event_handler':
    1> [my path] \nRF5_SDK_17.0.2_d674dde\components\libraries\uart/app_uart_fifo.c:119: undefined reference to `app_fifo_get'
    1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.44/gcc/arm-none-eabi/bin/ld: [my path]\nRF5_SDK_17.0.2_d674dde\components\libraries\uart/app_uart_fifo.c:83: undefined reference to `app_fifo_put'
    1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.44/gcc/arm-none-eabi/bin/ld: Output/Release/Obj/esb_ptx_pca10040/app_uart_fifo.o: in function `app_uart_init':
    1> [my path]\nRF5_SDK_17.0.2_d674dde\components\libraries\uart/app_uart_fifo.c:152: undefined reference to `app_fifo_init'
    1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.44/gcc/arm-none-eabi/bin/ld: [my path]\nRF5_SDK_17.0.2_d674dde\components\libraries\uart/app_uart_fifo.c:156: undefined reference to `app_fifo_init'
    1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 5.44/gcc/arm-none-eabi/bin/ld: Output/Release/Obj/esb_ptx_pca10040/app_uart_fifo.o: in function `app_uart_get':
    1> [my path]\nRF5_SDK_17.0.2_d674dde\components\libraries\uart/app_uart_fifo.c:205: undefined reference to `app_fifo_get'

  • the file has been inserted but inside the text is all cleared as if it did not find the define of the file.h but in the preprocessor the folder that contains the.h file is inserted
    if I click on the NRF_MODULE_ENABLED(APP_FIFO) function and I click "go to definition" takes me to the file nordic_common.h and not to app_fifo.h
  • I see, yes, you need this in sdk_config.h

    //==========================================================
    // <q> APP_FIFO_ENABLED  - app_fifo - Software FIFO implementation
     
    
    #ifndef APP_FIFO_ENABLED
    #define APP_FIFO_ENABLED 1
    #endif

  • thanks, now the program is compiled perfectly and if I start it captures perfectly that there is a communication on the uart but returns as an event APP_UART_COMMUNICATION_ERROR
Related