Using LPC802M001JDH20
As configuring the WDTT, even though everything (including clocksource and frequency) in Config Tools software is specified;
Config Tools provides the following inside peripherals.c:
const wwdt_config_t WWDT_config = {
.enableWwdt = true,
.enableWatchdogProtect = false,
.enableLockOscillator = true,
};
However, system fails inside fsl.wwdt.c -> WWDT_Init function @line 139 "assert(0U != config->clockFreq_Hz);"
Reason: Config Tool must add clock frequency inside WWDT_config struct:
const wwdt_config_t WWDT_config = {
.enableWwdt = true,
.enableWatchdogProtect = false,
.enableLockOscillator = true,
.clockFreq_Hz = XXXXXXX <- should be added but not by the Config Tools
};
Unless you fix this section by adding clockFreq manually, code will fail @ assert(0U != config->clockFreq_Hz);
Hi Arda,
I think you are combining WWDT v2.0.0 MCUXpresso Peripherals tool component with WWDT v2.1.4 MCUXpresso SDK driver. Difference between the two versions is in the clockFreq_Hz item in the configuration structure which was not present in the older driver version. Please switch the component in Peripherals tool to the latest version (v2.1.2) which is compatible with driver 2.1.4. Please refer to similar question raised here: ConfigTools issue: Watchdog configuration for LPC54113
Regarding the issue with empty lines ended with commas, I'm not able to reproduce it. If you could attach the .MEX file generated by the MCUXpresso Config Tools I may try it on my side.
Regards,
Lukas
Hi arda.otuz@eecelectronics.com.tr
Were you able to check my colleague Lukas Heczko's suggestions?
Best regards, Diego
Hi Arda,
Thank you for your reply.
Unfortunately, I was not able to replicate the issue using the .mex file that you provided us. I have the same build of the tool on Windows 10.
If you export the code manually to another folder or project, does the problems keep arising?
Sorry for all the inconvenience.
Best regards, Diego
I downloaded the attachment in an empty folder I have sent to you.
I unzipped and opened the .mex file and clicked update code:
The ouput of .c file:
It is not a big deal I guess, I fix the errors manually. Luckly LPC802 and my project is not complex.
Thank you for your support anyways. I will get going this way and hope some kind of update or windows update may fix it.
Hi Arda,
Also, thank you for your replies.
If you keep getting the same bugs in the future while doing new projects, please, report them again.
I'll check further, to see if we have missed something to solve this.
Best regards, Diego.
Hello, arda.otuz@eecelectronics.com.tr
Thank you for showing the issue.
Could you let me know how did you configure the peripheral?
I haven't managed to replicate the issue. I created a project for the same MCU adding the WWDT driver. Then I went to Config tools->Peripherals and check the WWDT peripheral and let the Preset >>default and finally clicked on update code.
This the structure that config tools created for me in on peripherals.c
const wwdt_config_t WWDT_config = {
.enableWwdt = true,
.enableWatchdogReset = false,
.enableWatchdogProtect = false,
.enableLockOscillator = false,
.windowValue = WWDT_WINDOW,
.timeoutValue = WWDT_TIMEOUT,
.warningValue = WWDT_WARNING,
.clockFreq_Hz = 250000
};
And my configuration for the peripheral.
Best regards, Diego.
Interesting, because the way you do it, it creates the code perfectly.
This is my configuration and the output:
No errors on the Keil side packages.
Code generated:
I even need to delete the commas in order to fix the errors.
Also the ADC code is having the comma error issue.
By the way, yes I am using Keil.
Hello, arda.otuz@eecelectronics.com.tr
Sorry for the delay.
Thank you for providing me that information!
Maybe the issue is related to the SDK and config tools version.
Could you provide me that additional info?
Best regards, Diego.
*** About MCUXpresso Config Tools:
Version and Build id: 7.0.0.202002070841
Installed tools:
Project Cloner (2.0)
Pins (7.0)
Clocks (7.0)
Peripherals (7.0)
TEE (1.0)
Device Configuration (2.0)