Contents of the IPSR register

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Contents of the IPSR register

869件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jdowd on Wed Jul 02 06:09:45 MST 2014
I'm using LCPXpresso to debug my LPC4088 application. I'm currently trying to get a I2S driver to work and I am sometimes ending up in the "intDefaultHandler()". When I get there I usually see the contents of the IPSR register to contain "43 (irq027)".

Is this telling me which interrupt vector that was aliased to the "intDefaultHandler()" was called to get to this state?

Cheers!!
0 件の賞賛
返信
6 返答(返信)

735件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jdowd on Wed Jul 02 10:05:27 MST 2014
Bingo!!

Congratulations sir you have passed this test!!

Seriously in my defense it's been a few years since I last used C++ and I'm still knocking the rust off.

Thanks for your patience.

Cheers!!
0 件の賞賛
返信

735件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Wed Jul 02 08:59:24 MST 2014
jdowd,

If you are using mbed, then you are programming in C++. Unless you tell it otherwise, C++ will 'mangle' the names. If you want it to have "C" naming, you must surround the definition with
extern "C" {
your_function_definition
}

This is standard C++...
0 件の賞賛
返信

735件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jdowd on Wed Jul 02 08:47:11 MST 2014
I did a cut & paste of the ISR name just to be sure and I'm still getting it mapped to the "intDefaultHandler()". I performed a clean and build.  I'm looking in the map file and I2S_IRQHandler() has the same value in the ".after_vectors" table as all of the other unused vectors (0x00000130).

I'll look in the setup attributes to the linker but I've done nothing to them from a "standard" project point of view in using an imported mbed project to LPCXpresso.

Is there any linker issues in my linker that I should be looking for? Is there some kind of ordering of declaration that I may have stumbled across that is "known" to people?

Cheers!!
0 件の賞賛
返信

735件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Wed Jul 02 08:19:00 MST 2014
Make sure the name of your ISR matches the one in the vector table (in the startup file).
0 件の賞賛
返信

735件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by jdowd on Wed Jul 02 07:20:37 MST 2014
Thank you for your prompt reply.

So it does appear that I'm in the "intDefaultHandler()" because the I2S interrupt went off but it is not in my ISR for some reason.

What I don't understand is that I have a linked in file that contains my ISR I2S_IRQHandler(). I can see it linked into the code in the map file. In fact I even call the ISR in my initialization routine in order to make sure it does not get optimized out. So why isn't this routine being used as my ISR?

I'm assuming that all I have to do is make sure that it is correctly named so that it overrides the WEAK attribute in the startup file.

Cheers!!
0 件の賞賛
返信

735件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Wed Jul 02 07:13:50 MST 2014
See:
http://infocenter.arm.com/help/topic/com.arm.doc.dui0552a/CHDBIBGJ.html
0 件の賞賛
返信