We are using EB Tresos for our project. This is an Autosar standard project. In our project we are trying to implement HW trigger for ADC conversions using BCTU. A PWM signal will be given to BCTU module and then BCTU will initiate a CL conversion. We also have implemented DMA so that after this CL conversion the results stored in the BCTU Fifo will be copied to a user buffer. Although with SW trigger we are able to successfully convert and transfer ADC results but when we try with HW trigger it is causing us much trouble. Like, after we flash and run the test code for the first time its working somewhat fine but when we reset and run the test code again, exception is occurred(DMA channel error interrupt i think). When we decoded with the TCD registers we are seeing Source Bus error bit set for the DMA channel. We believe this is not happening because of DMA itself but due to BCTU module as previously also we faced challenge when we tried to do ADC conversions using HW trigger without DMA .We think the DMA channels's configurations are updated inside Adc_EnableCtuControlmode(). We are using control mode in our project.
Hi @PetrS
I have a query. When we are running our project , its running into an BusFault after sometime. Can u do any help on it?
Our test project is simple.
We have a PWM signal(OPWMT - 9ms), it will trigger bctu module to initiate a CL conversion. The ADC will start the conversions and store the results into bctu FIFO. Using the watermark level of bctu FIFO, DMA request will be sent to the DMA channel configured requesting it to transfer the data from bctu fifo into a user buffer. We have developed the project completely using EBT.
The error we are seeing is this:-
Hi,
try to find a code causing hardfault;
https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K312-HARDFAULT-Interrupt-Handling-using-...
https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K312-HARDFAULT-Handling-Interrupt-DS3-5-...
If it is address 0x203fffac, this does not seems to be a valid one.
BR, Petr