This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
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

Why does setting NRF_PPI->TASKS_CHG[n].DIS = 1 cause a hardfault?

The statements NRF_PPI->TASKS_CHG[n].DIS = 1, and sd_ppi_group_task_disable(n) cause a hardfault when NRF_UICR->CLENR0 is set to the start of the application code, but do not cause a hardfault when NRF_UICR->CLENR0 is cleared to 0xFFFFFFFF. I have tried channels 0, 1, and 2. This call occurs before the main loop is exited, but well after softdevice is enabled. I have checked and found value of NRF_PPI->TASKS_CHG[n].DIS is already zero. Can PPI groups be used while the softdevice is protected? Thanks in advance for any insights.

Parents
  • I just tested this with S310 2.0.1.

    err_code = sd_ppi_group_task_disable(0);
    APP_ERROR_CHECK(err_code);
    

    returns 0x00000000 = NRF_SUCCESS, and there is no hard fault.

    err_code = sd_ppi_group_task_disable(2);
    APP_ERROR_CHECK(err_code);
    

    returns 0x00002009 = NRF_ERROR_SOC_PPI_INVALID_GROUP, and there is no hard fault.

    This is expected behavior according to Section 12.6 in the S310 SoftDevice spec.

Reply
  • I just tested this with S310 2.0.1.

    err_code = sd_ppi_group_task_disable(0);
    APP_ERROR_CHECK(err_code);
    

    returns 0x00000000 = NRF_SUCCESS, and there is no hard fault.

    err_code = sd_ppi_group_task_disable(2);
    APP_ERROR_CHECK(err_code);
    

    returns 0x00002009 = NRF_ERROR_SOC_PPI_INVALID_GROUP, and there is no hard fault.

    This is expected behavior according to Section 12.6 in the S310 SoftDevice spec.

Children
Related