First I begin by configuring the pwm ip example in S32DS to 100KHZ (Emios_Pwm_Ip_S32K358_100KHz), which works perfectly. However, then I attempt to create a new application project (trial_pwm) and replicate this configuration. For some reason, and on multiple checks, I cannot find any difference in these two codes and config files. Both codes can be built, but when I test the outputs on the oscilloscope, trial_pwm has no output. I have attempted to make them completely identical, but there is no pwm generated in this case.
Note: I know I can just copy it to use it, but I want to understand the toolchain and why trial_pwm failing as a consequence.
Hi @Rnk7
The only difference between the example and your project is that you enabled the EMIOS freeze state. The following are the effects when the freeze is enabled:
B.R
VaneB
Hi @VaneB ,
Ok that does solve things, but also gives me some other problems.
In the attached projects, I again build an extension of this project, a simple single channel and another multi channel adc using BTCU List, with only difference in the no. of channels configured in the list, but the BTCU responds only for single channel. This is when EMIOS freeze state is disabled. Now, if enabled, the PWM is lost yes, but the BTCU responds for both configurations (verified with external PWM). I am unsure of the cause for this, since I dont see any counters involved in parallel BTCU where resources might be split, and wish to inquire if there was any way to resolve such an conflict.
Regards,
Rounak
Hi @Rnk7
Check the following post. It is an example that uses the PIT0 trigger to trigger the BCTU conversion list. Five standard ADC channels are selected to be converted. It might be a good reference for your implementation.
Hi @VaneB ,
I have some problems with the dma here, the dma request path returns me a "Bctu_Ip_Bctu0Fifo1DmaComplete not defined" error. . When I add the RTD/src to the includes paths list for the project, the error goes away, but the BTCU doesn't default to watermark as expected.
I used an updated version of this training example, designed for DS3.5. The example is for RTD3.0.0, I am not sure if any additional configuration is needed for me, since I am using RTD 4.0.0. [https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K344-PIT-BTCU-parallel-ADC-FIFO-DMA-DS3-...].
Regards
Rnk7
The BTCU end of trigger notification, based on the BTCU-DMA Interrupt, has problems. It is the IntCtrl_Ip component which is causing this problem, the interrupt is not functioning when declared there. When I instead manually declare it using Installhandler functions, it works. How do I solve this issue and use IntCtrl_Ip instead?
Hi @Rnk7
The interrupt callback Bctu_Ip_Bctu0Fifo1DmaComplete is not managed by the IntCtr_Ip module. This is in charge of the modules Dma_Ip and Btcu_Ip. If you refer to the example you mentioned, the Callback is called in the DMA libraries and uses the Bctu_Ip_FifoDmaHandler in the Btcu_Ip_Irq.