STM324Discovery+LAN8720
Moderator: RoccoMarco
STM324Discovery+LAN8720
Good day to All. I repeated your project ARMCM4-STM32F407-LWIP for KEIL v4.74, but I use a chip ethernet LAN8720. Launch and begin to ping the device. After a few pings (ping -t -l 1400 192.168.1.204) the device freezes. What to do? If you need I can send the project. Thank you for help!
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: STM324Discovery+LAN8720
Hi,
Hard to do tests without hardware and it is hard to debug by just looking at code.
You should detail the nature of those freezes, do you have the debug options enabled in chconf.h? if so, is an error caught?
Giovanni
Hard to do tests without hardware and it is hard to debug by just looking at code.
You should detail the nature of those freezes, do you have the debug options enabled in chconf.h? if so, is an error caught?
Giovanni
Re: STM324Discovery+LAN8720
Hi,
put a break point in the procedure chDbgPanic. Get into it and see what dbg_panic_msg indicates the message "SV#4". It's about something said?
put a break point in the procedure chDbgPanic. Get into it and see what dbg_panic_msg indicates the message "SV#4". It's about something said?
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: STM324Discovery+LAN8720
SV#4 means that there is a problem in your code, the meaning is:
You have two consecutive chSysLock() somewhere or you call that from an ISR.
Giovanni
Code: Select all
* - SV#1, misplaced @p chSysDisable().
* - Called from an ISR.
* - Called from a critical zone.
* .
* - SV#2, misplaced @p chSysSuspend()
* - Called from an ISR.
* - Called from a critical zone.
* .
* - SV#3, misplaced @p chSysEnable().
* - Called from an ISR.
* - Called from a critical zone.
* .
* - SV#4, misplaced @p chSysLock().
* - Called from an ISR.
* - Called from a critical zone.
* .
* - SV#5, misplaced @p chSysUnlock().
* - Called from an ISR.
* - Not called from a critical zone.
* .
* - SV#6, misplaced @p chSysLockFromISR().
* - Not called from an ISR.
* - Called from a critical zone.
* .
* - SV#7, misplaced @p chSysUnlockFromISR().
* - Not called from an ISR.
* - Not called from a critical zone.
* .
* - SV#8, misplaced @p CH_IRQ_PROLOGUE().
* - Not called at ISR begin.
* - Called from a critical zone.
* .
* - SV#9, misplaced @p CH_IRQ_EPILOGUE().
* - @p CH_IRQ_PROLOGUE() missing.
* - Not called at ISR end.
* - Called from a critical zone.
* .
* - SV#10, misplaced I-class function.
* - I-class function not called from within a critical zone.
* .
* - SV#11, misplaced S-class function.
* - S-class function not called from within a critical zone.
* - Called from an ISR.
* .
You have two consecutive chSysLock() somewhere or you call that from an ISR.
Giovanni
Re: STM324Discovery+LAN8720
Interestingly, if
#define CH_DBG_SYSTEM_STATE_CHECK TRUE
SV # 4 happens during initialization tasks "lwip_thread", and if
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
see the situation described above (a few pings).
#define CH_DBG_SYSTEM_STATE_CHECK TRUE
SV # 4 happens during initialization tasks "lwip_thread", and if
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
see the situation described above (a few pings).
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: STM324Discovery+LAN8720
After the stop you can see exactly where it occurred by looking at the stack trace.
Giovanni
Giovanni
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: STM324Discovery+LAN8720
Hi,
Sorry but it is not physically possible for me to do debugging for users, I have a job and ChibiOS is already on top of that. In your case I don't even have the required hardware.
The kind of free support I can give in this forum is to answer specific questions and try to help users to solve their technical problems with suggestions and generic guidance. Of course if there is a suspect of a problem in ChibiOS code itself I usually am much more proactive.
If you make your code visible in the forum it is more likely that me or somebody else could find evident problems but more code you post and less likely is that something is found.
Giovanni
Sorry but it is not physically possible for me to do debugging for users, I have a job and ChibiOS is already on top of that. In your case I don't even have the required hardware.
The kind of free support I can give in this forum is to answer specific questions and try to help users to solve their technical problems with suggestions and generic guidance. Of course if there is a suspect of a problem in ChibiOS code itself I usually am much more proactive.
If you make your code visible in the forum it is more likely that me or somebody else could find evident problems but more code you post and less likely is that something is found.
Giovanni
- Giovanni
- Site Admin
- Posts: 14891
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: STM324Discovery+LAN8720
You can post it as a zip file on the forum in case somebody want to give it a look.
Giovanni
Giovanni