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);
  • still looking at the code of the main file.c modified by you I saw that the changes made concern only the speech of the CTS and RTS pins (which as I said we have not set by project), two libraries have been reactivated by me commented why? I saw that it was simply inserted in the handler of the uart the function esb_write_payload that as I said I will move later. the code I sent is the Tx project but it also acts as a receiver through uart the latter is the step that is giving me problems not receiving the data I send from the master
  • Hi,

    Ilary said:
    the CTS and RTS pins I did not configure them because we did not provide them.

    Ok, if you don't have any pins routed between the nRF52 and the STM8 that can be used for CTS and RTS, then you need to set APP_UART_FLOW_CONTROL_DISABLED.

    Ilary said:
    I have to bring it back to 0 to compile?

    No, you should keep it at 1.

    Also, make sure that you in the preprocessor settings, remove the define "NRF52"

    1) Did you replace the startup-files, and removed DEVELOP_IN_NRF52832 ?

    Ilary said:
    the code I sent is the Tx project but it also acts as a receiver through uart the latter is the step that is giving me problems not receiving the data I send from the master

    So it looks something like this,

    2) And you are not getting the data the STM8 is sending over UART?

    3) Do you see uart_event_handle() being called ?

    4) If it's still not working, could you post the schematic for your board?

  • 1 I disabled flow_control
    2 I brought to 1 the define in sdk_config.h
    3 I removed the define NRF52 from the preprocessor
     what are the files to be replaced?
    always remove develop_in_nrf52832 as a preprocessor definition?
    I still tried to compile after doing the first 3 steps listed but I have an error and it crashes the compilation for completeness the project works in this way : stm8 sends on uart to nrf52 in turn nrf52 sends to another nrf52 (remote device) the same data received. I can not currently answer the questions you asked me because I can not know if after the changes you proposed the situation changes
  • Hi,

    Ilary said:
     what are the files to be replaced?

    Remove system_nrf52.c and ses_startup_nrf52.s, and use these instead:


    -

    Ilary said:
    remove develop_in_nrf52832 as a preprocessor definition?

    if you are running on a nRF52805, then yes.

    Ilary said:
    I still tried to compile after doing the first 3 steps listed but I have an error

    What is the error?

  • the files to be replaced where do I find them?

    for the define ok I delete it.

    the error is this :

Related