We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when cpu(dsp_log) reads share memory written by DSP, the result is partially wrong!
step1, memcpy data to share memory in DSP, and set fft_share_memory->dsp_input_end=0xff:
for(int j=0;j<(fft_n/2+1);j++){ i_real[j]=j; i_imag[j]=j; } memcpy(fft_share_memory->dsp_input_data, i_real, (fft_n/2+1)*sizeof(float)); memcpy(fft_share_memory->dsp_input_data + (fft_n/2+1)*sizeof(float), i_imag, (fft_n/2+1)*sizeof(float)); fft_share_memory->dsp_input_end = 0xff;
step2,When dsp log detected fft_share_memory->dsp_input_end==0xff, read the data from the fft_share_memory->dsp_input_data and print:
float * ret = (float*)fft_share_memory->dsp_input_data; for(int j=0;j<n_fft+2;j++){ printf("%14.8f ", ret[j]); if(j%8==0){ printf("\r\n"); } }
step3: the ret print goes "0. 0. 0. ...0.", but the dsp input is "0. 1. 2. 3. ... "
k510 crb kit
No response
everytime
The text was updated successfully, but these errors were encountered:
volatile struct share_memory *fft_share_memory; Please check if fft_share_memory define have volatile .
Sorry, something went wrong.
wycwyhwyq
wangjianxin-canaan
No branches or pull requests
What happened
when cpu(dsp_log) reads share memory written by DSP, the result is partially wrong!
Reproduction steps
step1, memcpy data to share memory in DSP, and set fft_share_memory->dsp_input_end=0xff:
step2,When dsp log detected fft_share_memory->dsp_input_end==0xff, read the data from the fft_share_memory->dsp_input_data and print:
step3:
the ret print goes "0. 0. 0. ...0.", but the dsp input is "0. 1. 2. 3. ... "
Hardware board
k510 crb kit
Software version
No response
Bug frequency
everytime
Anything else
No response
The text was updated successfully, but these errors were encountered: