mask stacked reset if another message recieved at the same time
This commit is contained in:
@@ -45,10 +45,9 @@ void InterruptHandler::Thread(const void *arg) {
|
|||||||
bool notifSent = false;
|
bool notifSent = false;
|
||||||
while (true) {
|
while (true) {
|
||||||
/* If the INT_N line is low */
|
/* If the INT_N line is low */
|
||||||
if (!notifSent) {
|
if (xTaskNotifyWait(0x00, 0x0F, NULL, 200) == pdPASS) {
|
||||||
if (xTaskNotifyWait(0x00, 0x0F, NULL, 25) == pdPASS) {
|
//delay slightly so we catch the crc with better timing
|
||||||
osDelay(1);
|
osDelay(2);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
notifSent = false;
|
notifSent = false;
|
||||||
/* Read the FUSB302B status and interrupt registers */
|
/* Read the FUSB302B status and interrupt registers */
|
||||||
@@ -76,16 +75,18 @@ void InterruptHandler::Thread(const void *arg) {
|
|||||||
/* If the I_HARDRST or I_HARDSENT flag is set, tell the Hard Reset
|
/* If the I_HARDRST or I_HARDSENT flag is set, tell the Hard Reset
|
||||||
* thread */
|
* thread */
|
||||||
|
|
||||||
events = 0;
|
if (notifSent == false) {
|
||||||
if (status.interrupta & FUSB_INTERRUPTA_I_HARDRST) {
|
events = 0;
|
||||||
events |= PDB_EVT_HARDRST_I_HARDRST;
|
if (status.interrupta & FUSB_INTERRUPTA_I_HARDRST) {
|
||||||
notifSent = true;
|
events |= PDB_EVT_HARDRST_I_HARDRST;
|
||||||
} else if (status.interrupta & FUSB_INTERRUPTA_I_HARDSENT) {
|
notifSent = true;
|
||||||
events |= PDB_EVT_HARDRST_I_HARDSENT;
|
} else if (status.interrupta & FUSB_INTERRUPTA_I_HARDSENT) {
|
||||||
notifSent = true;
|
events |= PDB_EVT_HARDRST_I_HARDSENT;
|
||||||
}
|
notifSent = true;
|
||||||
if (events) {
|
}
|
||||||
ResetHandler::notify(events);
|
if (events) {
|
||||||
|
ResetHandler::notify(events);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* If the I_OCP_TEMP and OVRTEMP flags are set, tell the Policy
|
/* If the I_OCP_TEMP and OVRTEMP flags are set, tell the Policy
|
||||||
* Engine thread */
|
* Engine thread */
|
||||||
|
|||||||
Reference in New Issue
Block a user