In the reference manual, in the eport chapter, I have ridden there are up to eight interrupt pins. There are only four extern IRQ (IRQ7,IRQ5,IRQ3,IRQ1), so which are the other four?
And in the TWRMCF52259, what pin can I use for an extern interrupt? The switches aren't connected to this pins.
Thanks
解決済! 解決策の投稿を見る。
There are just 4 interrupts. The other 4 are considered as dummy, nowhere connected. So the RM should say that there are only 4 external IRQs.
An IMPORTANT thing to know : IRQ7 can not be used safely with MQX because this a level 7 interrupt and then can not be masked. In this case, MQX (and any other OS) is unable to protect its critical sections of code.
Unfortunately, I designed a board with a MCF52259 and used IRQ7 (PNQ7 pin) because I did not find any warning about that in the docs. After experiencing some MQX lockups I contacted the MQX support that explained that to me. As my design was already made, I had to use polling on this pin (reconfigured as a GPIO) to workaround the problem.
Dear Trailman,
Did you get any solution on IR7 (PNQ7) pin?
Unfortunately, I have designed a board with MCF52259 which uses IR7 too
I want to use ethernet feature of MQX by using same schematic as M52259demo board (Uses KSZ8041 ethernet IC). The M52259Demo uses all other interrupt pins (IRQ1, IRQ3 and IRQ5) for ethernet IC. So, I have no choice to use external interrupt. I have to use IRQ7
Does any suggestion about using external interrupt?
Hi,
Sorry for my delayed response.
Unfortunately there's no solution for IRQ7 other than doing polling on this pin (once configured as GPIO instead of IRQ).
However IRQ1 is not for Ethernet but for USB, so if you do not use USB, or if the signal USB_ALT_CLK is not always mandatory (I dont't know) you should be able to reuse it as IRQ1
Also IRQ3 and IRQ5 are used by Ethernet for PHY management through FEC_MDIO / FEC_MDC signals. However I'm not sure they are mandatory if you don't do some special PHY management.
Check the 52259 microcontroller documentation to make sure.
There are just 4 interrupts. The other 4 are considered as dummy, nowhere connected. So the RM should say that there are only 4 external IRQs.
Thanks JuroV
I have another question. Do you know which is the size of MQX? Just MQX (without programs, just libraries,kernel...). I have seen the .xmap file of some projects but always it's the same:
# Memory map:
v_addr p_addr size name
10000000 10000000 00000400 .vectors vectorrom
10000400 10000400 00000018 .cfmprotect cfmprotrom
10000420 10000420 0000AEE4 .main_application rom
00000420 00000420 0007FBE0 flashx
20000000 20000000 000000B0 .main_application_data ram
200000B0 200000B0 00000000 .kernel_data ram
2000FFF0 2000FFF0 00000000 .end_of_kernel_data end_of_kd
2000FA00 2000FA00 00000000 .boot_stack bstack
2000FBFF 2000FBFF 00000000 .end_of_boot_stack end_bstack
Thanks for your help
It depends how you configured MQX, it can be from kilobytes to tens of kilobytes. You should review the while xmap file, where you can see also code and data placement, not only sections and linker constants.
Thank you very much
When I call the function _mem_alloc(bytes), should I see the size of this block in the XMAP file?
I read the pointer to the adress where it allocates the block but it doesn't appear in the file.
Thanks
Mem allocation is dynamic allocation, i.e. it allocates from some dedicated space (called heap) for your application. In xmap file, you cannot see these variables.
Thanks for your help. Your replies help me a lot.