nRF5 SDK is not maintained anymore
More Info: Consider nRF Connect SDK for new designs
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

nRF52810 Running slower (abou 28mhz)

So, i just got some modules from minew, those are MS50SFB2 (https://www.minew.com/product/nrf52810-ms50sfb2/) based on nRF52810. I uploaded the blinky example on one of those and hooked an LED to the pin 2. For my surprise the led started blinking an about 2.5~2.2 times slower.

After fiddling with the configs, i found out in the timer source code:

#elif defined(NRF52810_XXAA) || defined(NRF52811_XXAA) || defined(NRF52820_XXAA)
    #define NRFX_DELAY_CPU_FREQ_MHZ 64
    #define NRFX_DELAY_DWT_PRESENT  0

So i got my scope and kept lowering the frequency until i reached 28 which the timer got preety close of what i set on code.

This is the code i have in the main.c: 

#include <stdbool.h>
#include <stdint.h>
#include "nrf_delay.h"
#include "boards.h"

int main(void)
{ 
   
    nrf_gpio_cfg_output(2);
    nrf_gpio_pin_clear(2);
    
    uint32_t pinN = 2;
    NRF_GPIO_Type * reg = nrf_gpio_pin_port_decode(&pinN);
    uint32_t aux =   1UL << pinN;
       
    while(1)
    {
       nrf_gpio_port_out_set(reg, aux);
       nrf_delay_ms(1000);
       nrf_gpio_port_out_clear(reg, aux);
       nrf_delay_ms(1000);
    }
}

I used the pca10040e project file (the pca10040 just crashes and jumps to the HardFault_Handler.

Im using the nRF5_SDK_17.1.0_ddde560 and segger studio 6.30 on windows 10.

Also i just wired the module with the power, the debug pins and the led pins. (extra capacitors made no difference)

Parents
  • Hello,

    The correct fix is to remove "DEVELOP_IN_NRF52832" and "NRFX_COREDEP_DELAY_US_LOOP_CYCLES" flags as explained here: Transferring the project to nRF52810 hardware. The CPU frequency is fixed at 64 MHz, so NRFX_DELAY_CPU_FREQ_MHZ should be changed back to the default.

    (the pca10040 just crashes and jumps to the HardFault_Handler.

    Please note that the "pca10040" configuration is made to run on the nRF52832, not the nRF52810. The reason you get a hardfault is that the project will try to use RAM that is not available on your chip.

    Best regards,

    Vidar

Reply
  • Hello,

    The correct fix is to remove "DEVELOP_IN_NRF52832" and "NRFX_COREDEP_DELAY_US_LOOP_CYCLES" flags as explained here: Transferring the project to nRF52810 hardware. The CPU frequency is fixed at 64 MHz, so NRFX_DELAY_CPU_FREQ_MHZ should be changed back to the default.

    (the pca10040 just crashes and jumps to the HardFault_Handler.

    Please note that the "pca10040" configuration is made to run on the nRF52832, not the nRF52810. The reason you get a hardfault is that the project will try to use RAM that is not available on your chip.

    Best regards,

    Vidar

Children
No Data
Related