Hi @danielmartynek ,
Thanks for you reply
Yesterday I made more debugging in the SW , turns out Cache and MPU are already enabled by the startup code
inside the file [system.c] , it checks for some macros to either enable or not [I-Cache, D-Cache , MPU]


And those macros are already defined in the project settings

- I think the issue when I was calling [Mcl_CacheInvalidate] there are already data added to the data cache and this results removing these data which affects the peripherals
-To test the Theory:
- I removed the data and instruction cache enable macros from the project settings
- left the MPU to be enabled by the startup code and removed the MPU Configuration from the MCL
- made sure that the startup code is not enabling the cache
- Enabled the cache support in the Mcl Configuration
- and call the functions [Mcl_CacheInvalidate] and [Mcl_CacheEnable] as before right after the Mcl_Init()
- Everything works fine and the issues with the [BCTU,PWM and ADC] are solved !!!
New Question: In your opinion would it be better to let the startup code enable and initialize the cache and MPU or should disable its handling and do this using the MCL Module , given that my project is running a PMSM Motor using FOC [Using NXP Application note on the topic:AN13767_3-phase_Sensorless_PMSM_Motor_Control_Kit_with_S32K344] ?
Best Regards,
Mohamed Salah