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

NRG_LOG not working on a NRF52833 - Custom Board

Hi,

I have been using NRF52833 DK for many applications - such as get a battery voltage - which was great using SDK. Now, I moved to my own PCB which has got NRF52833 chip as well. I am finding some issues to run the firmware I developed on the DK. The firmware I developed is based on a SDK 17.0.2 project example which is in examples\peripheral\saadc\pca10100. 

The first issue I have is with NRF_LOG. It doesn't work anymore. I don't see any data on the terminal. 

My question is what do I need to do moving from the DK to my PCB? Sorry if this is a vague question, I am new to firmware development and I am learning Nordic environment. 

The only thing I did moving from the DK is I configured the pins according to my PCB. I am wondering if those pins aren't considered and overridden by what's define in for example 'boards.h'.

May I have some support please?

Many thanks 

  • Hi Simon, 

    Thank you for your interest. 

    Apologies, it is not correct I am using more than PIN12. I meant I am using only PIN12 in the firmware. Here is my PCB schematic. I have a BMI160 sensor connected to the PCB as well. 

    For now I am running the battery firmware only. It is a rechargeable battery. The firmware gets the charging status and the battery level. Here is a bit of my code:

    #define BATT_CHARGE_PIN 12
    void batt_init(void)
    {
      /* Init charge pin */
      nrfx_gpiote_init();
    
      nrf_gpio_cfg_input(BATT_CHARGE_PIN,GPIO_PIN_CNF_PULL_Disabled);
      if(nrf_gpio_pin_read(BATT_CHARGE_PIN)==0)
      {
        batt_chg_status = 1; //charging
      }
      else
      {
        batt_chg_status = 0; //discharging
      }  
     

    Did you replace the nRF52833 DK board file with a custom one altogether?

    No, I didn't. That was my wide question about what I need to do moving from DK to my board. What do you mean by 'board file'? Could you point me to it please?

    About the NRG_LOG, I wish to keep using the UART instead of using the RTT. I see below it is using PIN 6 and effectively PIN 6 is taken on my board. Can I use another PIN for NRF_LOG_BACKEND_UART_TX_PIN that is free, like P0_20?

    #ifndef NRF_LOG_BACKEND_UART_TX_PIN
    #define NRF_LOG_BACKEND_UART_TX_PIN 6
    #endif

    Many thanks 

  • Hi

    Thank you for indulging me.

    As for the UART backend. This will only be possible to use with the onboard chip on the DK, as it is connected through the Interface MCU on the DK to create a UART/USB link to the computer. If you're using a custom board, you need to debug using RTT over the SWD pins on the board.

    Best regards,

    Simon

Related