C47D/nRF24_Component

Radio power up

Boland1776 opened this issue · 1 comments

If someone uses this component and had not changed "nRF24 Power" to "Power Up" (in the configurator) it must be done in main.c. Users should be careful NOT to call;
nRF24_set_bit(NRF_REG_CONFIG, NRF_CONFIG_PWR_UP), but use
nRF24_set_bit(NRF_REG_CONFIG, NRF_CONFIG_BIT_PWR_UP) instead.
If the user takes the latter, they must also include a delay of approx 5ms to allow the radio to stabilize.

I have three suggestions;

  1. Have the default setting in the configurator be "Power On". One could assume if they are including this device they will want it powered on.
  2. Add a function in FUNCS.c, such as...
    void nRF24_set_power_up_mode(void) {
    nRF24_set_bit(NRF_REG_CONFIG, NRF_CONFIG_BIT_PWR_UP);
    CyDelay(5u);
    }
  3. nRF24_wakeup() is very close to being a "power up" function but needs a delay.

There are a few other function calls in FUNC.c that need to use the NRF_CONFIG_BIT_PWR_UP (instead of NRF_CONFIG_PWR_UP).

Other than those nits, great job!!

C47D commented

Thanks @Boland1776 for reporting this problem, i had fixed it and a couple more with the latest commit, let me know if you find more problems.