This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Configuration UARTE with nrf52805 for ESB

Hello,

I am using nrf52 DK to program an nrf52805 with the ESB protocol. My nrf52805 is in slave mode compared to a micro Stm8l serial connected.

I'm having trouble configuring the UARTE on the nrf52805.

My configuration is: the TX pin of the Stm8l is connected to pin 18 of the nrf52805 and the RX pin of the stm8l is connected to the pin 21 of the nrf52805.

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

The baudrate is set by both sides of the UARTE at 2400

nrf_gpio_cfg_input(PIN_RXD,GPIO_PIN_CNF_PULL_Pullup);
nrf_gpio_cfg_output(PIN_TXD);

nrf_uarte_baudrate_set(PORT_UARTE, NRF_UARTE_BAUDRATE_2400);
nrf_uarte_txrx_pins_set(PORT_UARTE, PIN_TXD, PIN_RXD);
nrf_uarte_enable(PORT_UARTE); 

I tested the serial sending of the stm8l and it works perfectly. I use SES to read the code and I set up the project for nrf52805 following your guide.

I tested the project as it was born using nrf52805 as TX and an nrf52832 as RX doing various tests with the access of the LEDs and works perfectly, the problem arises having to serial receive the data from the micro that will then be sent to the receiver.

HELP ME PLEASE!

Parents Reply Children
  • Thanks,

    is there a particular method to include new libraries in the project? because looking at the example uses the library app_uart.h and the app_uart_fifo.h that is not included in the ESB project.
  • 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(PORTA_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 PORT_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);

Related