Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(CMSIS): Vector table address now properly set #819

Merged
merged 3 commits into from
Dec 8, 2023
Merged

Conversation

EricB-ADI
Copy link
Contributor

Description

Inside the startup script for the RISCV MAX32655, the vector table was being set to 0, instead of the the ISR vector table so interrupts were not working correctly.

@github-actions github-actions bot added the MAX32655 Related to the MAX32655 (ME17) label Dec 6, 2023
@EricB-ADI EricB-ADI changed the title fix(RISCV): Vector table address now properly set fix(CMSIS): Vector table address now properly set Dec 6, 2023
Copy link
Contributor

@Jake-Carter Jake-Carter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@Jacob-Scheiffler this would explain why the ISRs weren't working..........

@github-actions github-actions bot added the MAX78000 Related to the MAX78000 (AI85) label Dec 6, 2023
@Jake-Carter
Copy link
Contributor

@EricB-ADI I see on the AI87 we're doing

Reset_Handler:

  /* set start of flash in mvtec, with vectored mode */
  la    t0, (__FlashStart + 1)
  csrrw x0, mtvec, t0

I think we should also update this to use __isr_vector instead?

@EricB-ADI
Copy link
Contributor Author

EricB-ADI commented Dec 6, 2023

@EricB-ADI I see on the AI87 we're doing

Reset_Handler:

  /* set start of flash in mvtec, with vectored mode */
  la    t0, (__FlashStart + 1)
  csrrw x0, mtvec, t0

I think we should also update this to use __isr_vector instead?

It wont make a difference because the ISR vector table is the first thing placed into the linker script of the text section. So they are the same. However, I think it is more explicit what is happening if you spell out isr vector inside the Reset_Handler

@EricB-ADI EricB-ADI merged commit 547540b into main Dec 8, 2023
8 checks passed
@EricB-ADI EricB-ADI deleted the fix/risc-vtable branch December 8, 2023 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MAX32655 Related to the MAX32655 (ME17) MAX78000 Related to the MAX78000 (AI85)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants