ADC-DMA Doesn't work on S32K358 Example

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

ADC-DMA Doesn't work on S32K358 Example

354 次查看
simon98
Contributor III

Hi,

Currently i'm using XS32K3X8EVB-Q289 on MBDT 1.8 and i'm trying the ADC-DMA example provided.

The problem that i have is the same mentioned in this my previous ticket:

https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/ADC-DMA-Example-doesn-t-work/m-p/211706...

In the application operation I see, on freemaster, that ADC_POT0 value is updated only once by the ADC: if I change the position of the potentiometer and reset the board the new value of ADC_POT0 is set, but nomore update.

When i enter in debug on S32DS, if i set a breakpoint on Adc_StartGroupConversion call i could see, in the Expressions tab, that ADC_POT0 changes its value accordigly with the potentiometer position:

Screenshot 2026-03-12 170212.png

If i let the program running without breakpoints, on freemaster ADC_POT0 value doesn't update.

I thought that this behaviour was linked to freemaster, which, for some unknown reason, couldn't update the value of ADC_POT0, but if i set a breakpoint on the first line of the Hardware Interrupt Callback ADC_POT0 value doesn't update either in debug mode doing some Resume:

Screenshot 2026-03-12 170854.png

 

I've also tried to add a simple If in simulink where, if i got an adc value greater than 10000, flips the RGBLED0_BLUE. This, to work around the hypothetical freemaster problem but neither in this case worked... so freemaster doesn't cause the problem. 

Screenshot 2026-03-12 172136.png

I'm out of ideas, can anyone help me with this problem?

I attach the project updated.

 

Thanks,

Simon

 

 

 

0 项奖励
回复
0 回复数
%3CLINGO-SUB%20id%3D%22lingo-sub-2331625%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EADC-DMA%20%E5%9C%A8%20S32K358%20%E4%B8%8A%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8%E7%9A%84%E7%A4%BA%E4%BE%8B%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2331625%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%82%A8%E5%A5%BD%EF%BC%8C%3C%2FP%3E%3CP%3E%E7%9B%AE%E5%89%8D%EF%BC%8C%E6%88%91%E6%AD%A3%E5%9C%A8%20MBDT%201.8%20%E4%B8%8A%E4%BD%BF%E7%94%A8%20XS32K3X8EVB-Q289%EF%BC%8C%E5%B9%B6%E5%B0%9D%E8%AF%95%E4%BD%BF%E7%94%A8%E6%89%80%E6%8F%90%E4%BE%9B%E7%9A%84%20ADC-DMA%20%E7%A4%BA%E4%BE%8B%E3%80%82%3C%2FP%3E%3CP%3E%E6%88%91%E9%81%87%E5%88%B0%E7%9A%84%E9%97%AE%E9%A2%98%E4%B8%8E%E6%88%91%E4%B9%8B%E5%89%8D%E7%9A%84%E9%97%AE%E9%A2%98%E7%9B%B8%E5%90%8C%EF%BC%9A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FModel-Based-Design-Toolbox-MBDT%2FADC-DMA-Example-doesn-t-work%2Fm-p%2F2117066%23M10292%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FModel-Based-Design-Toolbox-MBDT%2FADC-DMA-Example-doesn-t-work%2Fm-p%2F2117066%23M10292%3C%2FA%3E%3C%2FP%3E%3CP%3E%E5%9C%A8%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E6%93%8D%E4%BD%9C%E4%B8%AD%EF%BC%8C%E6%88%91%E7%9C%8B%E5%88%B0%EF%BC%8C%E5%9C%A8%20freemaster%20%E4%B8%8A%EF%BC%8CADC_POT0%20%E5%80%BC%E4%BB%85%E7%94%B1%20ADC%20%E6%9B%B4%E6%96%B0%E4%B8%80%E6%AC%A1%EF%BC%9A%E5%A6%82%E6%9E%9C%E6%88%91%E6%9B%B4%E6%94%B9%E7%94%B5%E4%BD%8D%E8%AE%A1%E7%9A%84%E4%BD%8D%E7%BD%AE%E5%B9%B6%20RESET%20%E6%9D%BF%EF%BC%8C%E5%88%99%E4%BC%9A%E8%AE%BE%E7%BD%AE%20ADC_POT0%20%E7%9A%84%E6%96%B0%E5%80%BC%EF%BC%8C%E4%BD%86%E4%B8%8D%E4%BC%9A%E5%86%8D%E6%9B%B4%E6%96%B0%E3%80%82%3C%2FP%3E%3CP%3E%E5%BD%93%E6%88%91%E5%9C%A8%20S32DS%20%E4%B8%8A%E8%BF%9B%E5%85%A5%E8%B0%83%E8%AF%95%E6%97%B6%EF%BC%8C%E5%A6%82%E6%9E%9C%E6%88%91%E5%9C%A8%20adc_startGroupConversion%20%E8%B0%83%E7%94%A8%E4%B8%AD%E8%AE%BE%E7%BD%AE%E6%96%AD%E7%82%B9%EF%BC%8C%E6%88%91%E5%B0%B1%E8%83%BD%E5%9C%A8%20%E2%80%9C%E8%A1%A8%E8%BE%BE%E5%BC%8F%E2%80%9D%20%E9%80%89%E9%A1%B9%E5%8D%A1%E4%B8%AD%E7%9C%8B%E5%88%B0%20ADC_POT0%20%E4%BC%9A%E6%A0%B9%E6%8D%AE%E7%94%B5%E4%BD%8D%E8%AE%A1%E7%9A%84%E4%BD%8D%E7%BD%AE%E7%9B%B8%E5%BA%94%E5%9C%B0%E6%9B%B4%E6%94%B9%E5%85%B6%E5%80%BC%EF%BC%9A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202026-03-12%20170212.png%22%20style%3D%22width%3A%20661px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screenshot%202026-03-12%20170212.png%22%20style%3D%22width%3A%20661px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F379122iE4789BB11DC0D684%2Fimage-dimensions%2F661x375%3Fv%3Dv2%22%20width%3D%22661%22%20height%3D%22375%22%20role%3D%22button%22%20title%3D%22Screenshot%202026-03-12%20170212.png%22%20alt%3D%22Screenshot%202026-03-12%20170212.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%E5%A6%82%E6%9E%9C%E6%88%91%E8%AE%A9%E7%A8%8B%E5%BA%8F%E4%B8%8D%E5%B8%A6%E6%96%AD%E7%82%B9%E8%BF%90%E8%A1%8C%EF%BC%8C%E5%9C%A8%20freemaster%20%E4%B8%8A%20ADC_POT0%20%E7%9A%84%E5%80%BC%E4%B8%8D%E4%BC%9A%E6%9B%B4%E6%96%B0%E3%80%82%3C%2FP%3E%3CP%3E%E6%88%91%E5%8E%9F%E4%BB%A5%E4%B8%BA%E8%BF%99%E7%A7%8D%E8%A1%8C%E4%B8%BA%E4%B8%8E%20freemaster%20%E6%9C%89%E5%85%B3%EF%BC%8C%E5%9B%A0%E4%B8%BA%E4%B8%8D%E7%9F%A5%E4%BB%80%E4%B9%88%E5%8E%9F%E5%9B%A0%EF%BC%8C%E5%AE%83%E6%97%A0%E6%B3%95%E6%9B%B4%E6%96%B0%20ADC_POT0%20%E7%9A%84%E5%80%BC%EF%BC%8C%E4%BD%86%E5%A6%82%E6%9E%9C%E6%88%91%E5%9C%A8%E7%A1%AC%E4%BB%B6%E4%B8%AD%E6%96%AD%E5%9B%9E%E8%B0%83%E7%9A%84%E7%AC%AC%E4%B8%80%E8%A1%8C%E8%AE%BE%E7%BD%AE%E6%96%AD%E7%82%B9%EF%BC%8CADC_POT0%20%E7%9A%84%E5%80%BC%E5%9C%A8%E8%B0%83%E8%AF%95%E6%A8%A1%E5%BC%8F%E4%B8%8B%E5%81%9A%E7%AE%80%E5%8E%86%E6%97%B6%E4%B9%9F%E4%B8%8D%E4%BC%9A%E6%9B%B4%E6%96%B0%EF%BC%9A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202026-03-12%20170854.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screenshot%202026-03-12%20170854.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F379124i6E0A8B7CC9FB3DCE%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Screenshot%202026-03-12%20170854.png%22%20alt%3D%22Screenshot%202026-03-12%20170854.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%E6%88%91%E8%BF%98%E5%B0%9D%E8%AF%95%E5%9C%A8%20simulink%20%E4%B8%AD%E6%B7%BB%E5%8A%A0%E4%B8%80%E4%B8%AA%E7%AE%80%E5%8D%95%E7%9A%84%20If%EF%BC%8C%E5%A6%82%E6%9E%9C%E5%BE%97%E5%88%B0%E7%9A%84%20adc%20%E5%80%BC%E5%A4%A7%E4%BA%8E%2010000%EF%BC%8C%E5%88%99%E7%BF%BB%E8%BD%AC%20RGBLED0_BLUE%E3%80%82%E8%BF%99%E6%A0%B7%E5%81%9A%E6%98%AF%E4%B8%BA%E4%BA%86%E8%A7%A3%E5%86%B3%E5%81%87%E8%AE%BE%E7%9A%84%20freemaster%20%E9%97%AE%E9%A2%98%EF%BC%8C%E4%BD%86%E5%9C%A8%E6%9C%AC%E4%BE%8B%E4%B8%AD%E4%B8%A4%E8%80%85%E9%83%BD%E6%B2%A1%E6%9C%89%E6%88%90%E5%8A%9F......%E6%89%80%E4%BB%A5%20freemaster%20%E5%B9%B6%E6%B2%A1%E6%9C%89%E9%80%A0%E6%88%90%E9%97%AE%E9%A2%98%E3%80%82%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202026-03-12%20172136.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screenshot%202026-03-12%20172136.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F379126i4BA5590EE2A19014%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Screenshot%202026-03-12%20172136.png%22%20alt%3D%22Screenshot%202026-03-12%20172136.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%E6%88%91%E6%B2%A1%E8%BE%99%E4%BA%86%EF%BC%8C%E8%B0%81%E8%83%BD%E5%B8%AE%E6%88%91%E8%A7%A3%E5%86%B3%E8%BF%99%E4%B8%AA%E9%97%AE%E9%A2%98%EF%BC%9F%3C%2FP%3E%3CP%3E%E6%88%91%E9%99%84%E4%B8%8A%E6%9B%B4%E6%96%B0%E5%90%8E%E7%9A%84%E9%A1%B9%E7%9B%AE%E3%80%82%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%E8%B0%A2%E8%B0%A2%EF%BC%81%3C%2FP%3E%3CP%3E%E8%A5%BF%E8%92%99%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CP%3E%E2%80%83%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E