STM32 Ethernet PTP implementation Issue (Hard Fault)
Hello ,
I am trying to implement PTP (IEEE1588) on stm32f107 I have used this code for reference
"https://github.com/mpthompson/stm32_f4_ptpd" and ported it to stm32f107
Now, Everything works fine if Time stamp register bit 0 is set to "0" ,i.e..
I can see the sync and announce packets in wireshark and the program is running with 0 timestamps , below attached is the debug2 for reference.
if Time stamp register bit 0 is set to "1" program halts with hardfault. with below debug 1 and attached is the image of what fault analyzer has to say.
Thanks For helping ...
.
Debug 1
(D 0.001348318) event POWER UP
(D 0.002258042) leaving state PTP_INITIALIZING
(D 0.003519519) entering state PTP_INITIALIZING
(D 0.004792008) manufacturerIdentity: PTPd;2.0.1
(D 0.006093251) netShutdown
Assertion "igmp_leavegroup: attempt to leave non-multicast address" failed at line 551 in ../Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.c
(D 0.010608396) netInit
(D 0.011315183) initData
(V) initData: EUI48toEUI64
(D 0.012704188) initTimer
(D 0.013452584) initClock
(d 0.014147498) adjFreq 0
(d 0.014854946) bmc: m1
(D 0.015507389) leaving state PTP_INITIALIZING
(D 0.016767384) entering state PTP_LISTENING
(d 0.017966648) timerStart: set timer 3 to 3000
Problem: Success
Debug 2
D 0.000000000) event POWER UP
(D 0.000000000) leaving state PTP_INITIALIZING
(D 0.000000000) entering state PTP_INITIALIZING
(D 0.000000000) manufacturerIdentity: PTPd;2.0.1
(D 0.000000000) netShutdown
Assertion "igmp_leavegroup: attempt to leave non-multicast address" failed at li ne 551 in ../Middlewares/Third_Party/LwIP/src/core/ipv4/igmp.c
(D 0.000000000) netInit
(D 0.000000000) initData
(V) initData: EUI48toEUI64
(D 0.000000000) initTimer
(D 0.000000000) initClock
(d 0.000000000) adjFreq 0
(d 0.000000000) bmc: m1
(D 0.000000000) leaving state PTP_INITIALIZING
(D 0.000000000) entering state PTP_LISTENING
(d 0.000000000) timerStart: set timer 3 to 3000
(d 0.000000000) timerExpired: timer 3 expired
(d 0.000000000) event ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES for state PTP_LISTENING
(d 0.000000000) bmc: m1
(d 0.000000000) recommending state PTP_MASTER
(D 0.000000000) leaving state PTP_LISTENING
(D 0.000000000) initClock
(d 0.000000000) adjFreq 0
(d 0.000000000) timerStop: stop timer 3
(D 0.000000000) entering state PTP_MASTER
(d 0.000000000) timerStart: set timer 2 to 1000
(D 0.000000000) SYNC INTERVAL TIMER : 1000
(d 0.000000000) timerStart: set timer 4 to 1000
(d 0.000000000) timerExpired: timer 2 expired
(d 0.000000000) event SYNC_INTERVAL_TIMEOUT_EXPIRES for state PTP_MASTER
(d 0.000000000) netSend: 0 sec 0 nsec
(d 0.000000000) issueSync
(d 0.000000000) timerExpired: timer 4 expired
(d 0.000000000) event ANNOUNCE_INTERVAL_TIMEOUT_EXPIRES for state PTP_MASTER
(d 0.000000000) netSend
(d 0.000000000) issueAnnounce
(d 0.000000000) timerExpired: timer 2 expired
(d 0.000000000) event SYNC_INTERVAL_TIMEOUT_EXPIRES for state PTP_MASTER
(d 0.000000000) netSend: 0 sec 0 nsec
(d 0.000000000) issueSync
(d 0.000000000) timerExpired: timer 4 expired
(d 0.000000000) event ANNOUNCE_INTERVAL_TIMEOUT_EXPIRES for state PTP_MASTER
(d 0.000000000) netSend
(d 0.000000000) issueAnnounce
(d 0.000000000) timerExpired: timer 2 expired
(d 0.000000000) event SYNC_INTERVAL_TIMEOUT_EXPIRES for state PTP_MASTER
(d 0.000000000) netSend: 0 sec 0 nsec
(d 0.000000000) issueSync
