I am working with the NTAG NT3H2111W0FHKH I am trying to get it to work with the frdm-kl03z development board but I am having issues with the code throwing hard faults. I have adjusted the example code that comes with the NTAG explorer board and works with LPC line of microprocessors. The code runs but will throw faults when writing to a memory address. I believe this may be an issue with the I2C base address. What should I set the base address in order to avoid throwing hard faults? Any help would be great.
Hello,
You can try using the KL02 example as a base, when you are building the SDK for the FRDM-KL03 you can see this :
You can try to copy the folders in your project and add the different initialization, could you please check it and try this approach and try to run the example there in your device ?
Regards,
Estephania
Hi there,
Thanks for the reply. Super helpful.
I did this and got the code to compile, but when I go to debug it throws a hard fault before reaching the main function.
The fault says,
"Break at address "0x1c001ed4" with no debug information available, or outside of program code"
it there any experience with this?
Does it happen with the demo or driver examples as well ? Or is it only with your code migration/NTAG implementation ?
Regards ,
Estephania
I got the hard fault fixed by changing the RAM location in the MCU settings. However, the code keeps getting hung up on the setup function when trying to execute the line HAL_ISR_RegisterCallback((ISR_SOURCE_T)0, ISR_LEVEL_LO, NULL, NULL);. When I step into the function the code seems to hang up on the line enableInterrupt(callback->channel);
I am not sure why this is happening or how to rectify this.
Hello,
I don't understand why you had to change the RAM configuration if you use the KL03Z as a base all the configurations and functions of the i2c polling example (if you imported that) should be already there.
If you did not use the i2c polling as a base, which one you used?
Regards,
Estephania
I don't think the Ram settings changed automatically when I changed the MCU from the KL02z to the KL03Z
Hello,
I'm not sure if you modified all the necessary elements and if all the necessary elements in the project configurations.
I would recommend you to use one of the I2C examples in the SDK, copy the HAL folders as well as the NTAG I2C folder and the source folder.
In this way, you already have all the project configured correctly, and you will only need to add the folders to the project path
Regards ,
Estephania
I ended up having to change the startup files and the preprocessor steps. It is working now thanks.