i.MXRT1060 problem with the vector table address

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

i.MXRT1060 problem with the vector table address

Jump to solution
2,148 Views
armandc_
Contributor III

Hello,

We are using the i.MX RT1060 with Zephyr and mcuboot.We had a problem when booting with the ENET driver enabled: the system triggered the NMI and therefore failed to boot. After 2 weeks of investigation I discovered that the problem is related to the vector table.

The system boots from a NOR flash attached to the first FlexSPI interface. mcuboot is placed at the beginning of the flash (0x60000000) and Zephyr after it at 0x60040000. The vector table for Zephyr is located in the NOR flash at 0x60040200. When Zephyr starts it correctly set the VTOR register to 0x60040200 but whenever IRQ 114 triggers the CPU jumps to the NMI. I checked the vectors in the table and they are all correct.

According to http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0646b/BABIFJFG.html  the alignment of the vector table address is sufficient.

If I change the address of the vector table to 0x60040100 or 0x60040400 everything works fine.

Here is what I observed: when the vector table is at offset 0x60040200 any interrupt with IRQ above 111 (from 112 to 159) does not trigger its vector but its vector - 128, e.g. ENET IRQ (114) do not jump to vector 130 but to vector 2 (130 - 128) which is the NMI.

It is a known problem? or is there other constraint on the vector table address?

Labels (1)
Tags (1)
1 Solution
1,899 Views
armandc_
Contributor III

Hello,

Fortunately the problem has been investigated by the Zephyr team Cannot use mcuboot with i.MXRT1060 due to a problem with the vector table address · Issue #27380 · z... 

The problem is not related to the CPU but to the offset used in Zephyr which does not comply to the alignment requirement.

Armand Ciejak

View solution in original post

7 Replies
1,899 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Armand Ciejak 

  Can you simplify the project to reproduce the issue?

  Just let me to follow you to reproduce the issue, then I will do more checking about it.

Waiting for your updated information.

Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
1,899 Views
armandc_
Contributor III

Hi Kerry Zhou,

Sorry for the very late answer, but I was too busy so far...

Here is how to reproduce the problem  using Zephyr and the MIMXRT1060-EVK board.

First build a network Zephyr sample application, that should work fine:

  mkdir test
  cd test
  python3 -m venv --prompt test venv
  source venv/bin/activate
  pip install west==0.6.0 cmake==3.14.3.post1
  west init myproject
  cd myproject
  west update
  pip install -r zephyr/scripts/requirements.txt
  cd zephyr
  git co v2.3.0
  source zephyr-env.sh
  west build -b mimxrt1060_evk samples/net/dhcpv4_client
  west flash

Then change the address of the vector table by modifying the value of TEXT_SECTION_OFFSET from 0x2000 to 0x2200 in the "soc/arm/nxp_imx/rt/Kconfig.defconfig.series" file.

Rebuild and flash:

  west build -b mimxrt1060_evk samples/net/dhcpv4_client -p
  west flash

Now the system doesn't boot anymore because it is stuck in the NMI.

0 Kudos
1,899 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Armand Ciejak,

  Thanks for your updated information.

  Can you reproduce the issue with the official SDK project?

  Seems your Zephyr project is not the NXP official code.

Best Regards,

Kerry

   

0 Kudos
1,899 Views
armandc_
Contributor III

Hi Kerry Zhou,

I'm very disappointed by our answer, I spent quite some time figuring out the problem and then providing an easy way to reproduce it.

I expect NXP to treat such request more seriously and not hide behind things like "you are not using the official SDK". NXP contributes to Zephyr (Zephyr™ OS | NXP ) therefore using it should not be an excuse to discard my request.

Armand Ciejak

0 Kudos
1,899 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Armand Ciejak

  Thanks a lot for your valuable feedback, it's my fault that I am not familiar with the Zephyr and give the not precise reply.

   From your newest link, it is really can support by the RT now.

   Could you please also share your Zephyr with RT test project/demo about it?

   Please also tell me where you get the network Zephyr sample application, please also share the link.

   Then I will try to test it and reproduce your issues on my side.

    If I meet any issues, I will also help you to check it internally, find some experts who are familiar with the Zephyr with RT.

   

Best Regards,

Kerry

0 Kudos
1,900 Views
armandc_
Contributor III

Hello,

Fortunately the problem has been investigated by the Zephyr team Cannot use mcuboot with i.MXRT1060 due to a problem with the vector table address · Issue #27380 · z... 

The problem is not related to the CPU but to the offset used in Zephyr which does not comply to the alignment requirement.

Armand Ciejak

1,899 Views
armandc_
Contributor III

Hi Kerry,

Thanks for your answer. You can simply execute the commands listed in my previous message, that will get the Zephyr project which contains the sample application (zephyr/samples/net/dhcpv4_client at master · zephyrproject-rtos/zephyr · GitHub ) and build it for the eval board.

0 Kudos