Using NTAG I2C chip with frdm-kl03z

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using NTAG I2C chip with frdm-kl03z

3,106 Views
darren
Contributor II

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.

Labels (1)
8 Replies

2,887 Views
estephania_mart
NXP TechSupport
NXP TechSupport

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 :

pastedImage_3.png

 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

2,887 Views
darren
Contributor II

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?

0 Kudos
Reply

2,887 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Does it happen with the demo or driver examples as well ? Or is it only with your code migration/NTAG implementation ?

Regards ,

Estephania

0 Kudos
Reply

2,887 Views
darren
Contributor II

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.

0 Kudos
Reply

2,887 Views
estephania_mart
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply

2,887 Views
darren
Contributor II

I don't think the Ram settings changed automatically when I changed the MCU from the KL02z to the KL03Z

0 Kudos
Reply

2,887 Views
estephania_mart
NXP TechSupport
NXP TechSupport

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

pastedImage_9.png

Regards ,

Estephania

0 Kudos
Reply

2,887 Views
darren
Contributor II

I ended up having to change the startup files and the preprocessor steps. It is working now thanks.

0 Kudos
Reply