Author Topic: Default ISR in Cypress PSoC 5LP - ARM Cortex M3  (Read 1400 times)

0 Members and 1 Guest are viewing this topic.

Offline thexenoTopic starter

  • Regular Contributor
  • *
  • Posts: 83
  • Country: it
  • Just another EE
    • Personal website
Default ISR in Cypress PSoC 5LP - ARM Cortex M3
« on: May 29, 2019, 08:26:53 am »
Hi guys,

I just started with the PSoC 5LP. The utility from Cypress let me use and assign any kind of interrupt fairly easily.
Maybe I am not a fan of full fledged GUI approach, because I have a development style which never rely on auto-generated code, I guess I have to change now.

So the problem is that I would like to assign all the unused IVT entries to my handler for unused ISR. I found my self a bit in difficulties for two reasons:

1. I am new to ARM architectures, so I would like to know what is the good approach when dealing with custom default ISR
2. I am not confident in manually changing the table, as there is a lot of autogenerated code

So I asked to Cypress forum, but I gave up as I got answers like the fact that if I don't use the interrupt then it never fires - or the default ISR (which is an infinite loop). This does not smell good to me.

Is anyone else who ever tried to re-assign the default ISR in the IVT of an ARM? Is this really absurd what I am trying to do?

Thanks to all!

Offline Brutte

  • Frequent Contributor
  • **
  • Posts: 614
Re: Default ISR in Cypress PSoC 5LP - ARM Cortex M3
« Reply #1 on: May 29, 2019, 09:28:55 am »
I guess I have to change now.
I cannot help you with Cypress IDE.
Finding a default ISR is quite easy when you look at the source code (GCC).

But I have already commented the IMHO futile effort in mastering wizards.
Wizarding works only when you do not need to ask questions (when you are a professionalist that can already do the job not looking at the screen). If you are a noob and you hit any problem - you are  |O with no clue what went wrong.

My solution:
  • either use wizarding but limit yourself to "blinking an LED" (no customization)
  • or do it properly by using a wizard just as a reference and write/review the code with full understanding what is going on there.

 
The following users thanked this post: thexeno

Offline SomeElectronicsEngineer

  • Newbie
  • Posts: 1
  • Country: nl
Re: Default ISR in Cypress PSoC 5LP - ARM Cortex M3
« Reply #2 on: May 29, 2019, 10:04:09 am »
See cm3start.c:
* define CY_BOOT_INT_DEFAULT_HANDLER_EXCEPTION_ENTRY_CALLBACK in cyapicallbacks.h
* declare CyBoot_IntDefaultHandler_Exception_EntryCallback in cyapicallbacks.h
* implement CyBoot_IntDefaultHandler_Exception_EntryCallback wherever you like.
 
The following users thanked this post: thexeno

Offline thexenoTopic starter

  • Regular Contributor
  • *
  • Posts: 83
  • Country: it
  • Just another EE
    • Personal website
Re: Default ISR in Cypress PSoC 5LP - ARM Cortex M3
« Reply #3 on: June 03, 2019, 08:50:00 am »
Thanks to all.

See cm3start.c:
* define CY_BOOT_INT_DEFAULT_HANDLER_EXCEPTION_ENTRY_CALLBACK in cyapicallbacks.h
* declare CyBoot_IntDefaultHandler_Exception_EntryCallback in cyapicallbacks.h
* implement CyBoot_IntDefaultHandler_Exception_EntryCallback wherever you like.

That was what I wildly guessed, but I was not sure if was conflicting with the GUI part. Is working as I needed. Thank you!


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf