Hello,
I am having an issue with setting up the event generation timing on the nRF51822. Long story short, I am configuring Timer/Counter 0 to generate an event every 50ms. I am using this to generate an emergency kick-out during data exchange between an external uController and the nRF51822. I am seeing the timer/counter generate an event every 4ms instead.
Now for a little background on my implementation. I am using the nRF51 development kit fly-wired to my external uController. I am building on the example implementation called ble_app_uart_pca10028_s130 using the s130 Bluetooth stack. This example did not have any of the 4 timer/counters enabled and implemented so to do so I referenced the timer_pca10028 example. I initialized timer/counter 0 in the following way:
I have the following parameters that relate to Timer/counter configured in sdk_config.h as follows:
I notice immediately upon flashing the nRF51 dev kit that it completely stops broadcasting Bluetooth. I have not taken time to debug exactly what occurs at this point but it seems that the application code in the nRF51822 has completely cratered at this point. Upon tinkering, I changed the implementation from using Timer/counter 0 to 1 and as soon as I did, it boot up and began executing as expected. The event generation works and I am able to use it as means to generate bailouts during inter-processor communication.
I am configuring the Timer/counter to generate events at a 50ms rate however my debugging trace on pin P0.06 tells me that it is instead banging away at 4ms instead. I am assuming that I am having some sort of cross peripheral conflict here. To be blunt, I am still very new to the nRF line and still learning as I go so some insight on how to properly configure these peripherals to be congruent with the intended output would be greatly appreciated.