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)