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

fft latency problem in nrf52

i am working using NRF52, s132, sdk11, freertos.

for fft , i used "arm_rfft_fast_f32(...)" in cmsis-dsp library.

and i inserted a fpu interrupt.

NVIC_SetPriority(FPU_IRQn, APP_IRQ_PRIORITY_LOW);
NVIC_ClearPendingIRQ(FPU_IRQn);
NVIC_EnableIRQ(FPU_IRQn);

void FPU_IRQHandler(void)
{
     uint32_t *fpscr = (uint32_t *)(FPU->FPCAR+0x40);
     (void)__get_FPSCR();
      NVIC_ClearPendingIRQ(FPU_IRQn);

     *fpscr = *fpscr & ~(FPU_EXCEPTION_MASK);
}

if i enable a FPU_IRQ, the fft latency is very long.

if i disalbe a FPU_IRQ, the fft latency is very fast. but I can't enter to sleep.

and system is very unstable.

i would like to know the best setting for a fft performance in freertos+s132+nrf52.

thank you

Parents
  • I think you have enable FPU in ARM core

    Either enable __FPU_USED then the system_nrf52.c file OR

    do it manually where you want to enable it like below

    SCB->CPACR |= (3UL << 20) | (3UL << 22);
    __DSB();
    __ISB();
    

    and disable it when you want to save power when you know its being not used by

    SCB->CPACR = 0; 
    __DSB();
    __ISB();
    

    In assembly you can do like this

  • thank you for reply.

    I tried your guides. but my result is same to previous status.

    currently, when i used "NVIC_EnableIRQ(FPU_IRQn)", the fft latency(arm_rfft_fast_f32) is 10~12ms in FFT size 1024. by the way, in NVIC_DisbleIRQ(FPU_IRQn), it is 2ms .

    i think that the FPU_IRQHandler is so many called. so the latency is long. right?

    i would like to know the fft(arm_rfft_fast_f32) latency in fft size 1024, NRF52.

    i hope that the latency is about 2ms in a FPU_IRQ enable.

    thank you.

Reply
  • thank you for reply.

    I tried your guides. but my result is same to previous status.

    currently, when i used "NVIC_EnableIRQ(FPU_IRQn)", the fft latency(arm_rfft_fast_f32) is 10~12ms in FFT size 1024. by the way, in NVIC_DisbleIRQ(FPU_IRQn), it is 2ms .

    i think that the FPU_IRQHandler is so many called. so the latency is long. right?

    i would like to know the fft(arm_rfft_fast_f32) latency in fft size 1024, NRF52.

    i hope that the latency is about 2ms in a FPU_IRQ enable.

    thank you.

Children
No Data
Related