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

Custom board issue

Hi,

We just received our custom board based nRF52832, below nRF52832 schematic image description

I succeed to flash the board. but i have frequency troubles. I made a simple exemple to verify this:

#define TIMEOUT_VALUE                    10                           /**< 10 microsecond timer time-out value. */

#define PIN_OUT 12


void timeout_handler(void * p_context)
{
        nrf_drv_gpiote_out_toggle(PIN_OUT);

}
 
int main(void)
{
	  ret_code_t err_code;

    err_code = nrf_drv_gpiote_init();
    APP_ERROR_CHECK(err_code);
    
    nrf_drv_gpiote_out_config_t out_config = GPIOTE_CONFIG_OUT_SIMPLE(false);

    err_code = nrf_drv_gpiote_out_init(PIN_OUT, &out_config);
    APP_ERROR_CHECK(err_code);

    err_code = app_simple_timer_init();
    APP_ERROR_CHECK(err_code);
                
		err_code = app_simple_timer_start(APP_SIMPLE_TIMER_MODE_REPEATED, 
													 timeout_handler, 
													 TIMEOUT_VALUE, 
													 NULL);            
		APP_ERROR_CHECK(err_code);    
    
    for (;;)
    {

    }    
}

When i run this example over Nordic DevKit PCA10040, i get a square wave with period of 20us. when i run the same example over our custom board, i get a square wave with period of ~17us.

Any idea of the cause of this trouble ? please.

Best regards.

Parents
  • I would say most likely your crystal isn't running at 32MHz but something faster, which would usually suggest increasing the load capacitors. Did you use the same 9pF crystal as the development board, if you used something higher, that would need correspondingly higher load capacitors. eg if the crystal is a 12pF one, you'd need capacitors more like 20pF than 12pF.

    Are you sure the correct capacitors were installed?

Reply
  • I would say most likely your crystal isn't running at 32MHz but something faster, which would usually suggest increasing the load capacitors. Did you use the same 9pF crystal as the development board, if you used something higher, that would need correspondingly higher load capacitors. eg if the crystal is a 12pF one, you'd need capacitors more like 20pF than 12pF.

    Are you sure the correct capacitors were installed?

Children
No Data
Related