This worked well in a unit that I purchased around the time you wrote that. However, in a newly purchased unit, this didn't work. Is it possible that more recent units return something different than 4U? Which codes can we expect? Is the rule that the code should be greater than or equal to 4? Or is it a bit mask? Or something else?M.Heidemann wrote: ↑Thu 22. Oct 2020, 16:31
In this case you can use the wake-up functionality in case you get the return of "4U" (As seen in the code).
Power-down
Re: Power-down
-
- Sales & Support
- Posts: 1083
- Joined: Fri 20. Sep 2019, 13:31
Re: Power-down
Hello,
Thank you for the feedback.
Our most recent Hardware-Revision is Hardware Revision 6,
so you should check for Hardware-Revision >=4, since the wake-up feature
was introduced in Hardware-Revision 4.
Furthermore you could also write the current Hardware-Revision into your greeting message,
this way you can directly obtain information about the hardware revision:
This example writes the Hardware-Revision into Byte 1 of the greeting messag (byte 0 being the FPGA-Version), for example
the latest hardware-revision 6:
Please report back to us, if this was able to solve your issue.
Best Regards
Marvin
Thank you for the feedback.
Our most recent Hardware-Revision is Hardware Revision 6,
so you should check for Hardware-Revision >=4, since the wake-up feature
was introduced in Hardware-Revision 4.
Furthermore you could also write the current Hardware-Revision into your greeting message,
this way you can directly obtain information about the hardware revision:
Code: Select all
static void main_greeting ( void)
{
CANTxMsg_t Msg;
Msg.bufftype = CAN_BUFFER_TX_MSG;
Msg.dlc = CAN_LEN8_DLC;
Msg.msgtype = CAN_MSGTYPE_STANDARD;
Msg.id = 0x404;
// overwrite byte 0 with FPGA version
Msg.data8[0] = FPGA_VERSION;
Msg.data8[1] = HW_GetHwVersion();
Msg.data8[2] = 0x00;
Msg.data8[3] = 0x00;
Msg.data8[4] = 0x00;
Msg.data8[5] = 0x00;
Msg.data8[6] = 0x00;
Msg.data8[7] = 0x00;
// Send Msg
CAN_Write ( CAN_BUS1, &Msg);
}
the latest hardware-revision 6:
Please report back to us, if this was able to solve your issue.
Best Regards
Marvin
---
Marvin Heidemann
PEAK-Support Team
Marvin Heidemann
PEAK-Support Team
Re: Power-down
Hi, and thanks for the clarification. Yes, it solves the issue for the units I have been able to test.
What made me a bit confused was the version checking code:
So it's non-trivial to realize how the version number is constructed. (If the internal magic number is 12, then version is 4 or 5, so return 4. Otherwise return the internal number...) But then I simply assume that any number larger than or equal to 4 can safely be put to sleep.
What made me a bit confused was the version checking code:
Code: Select all
else if ( hw_version == 12U)
{
// hw-version is 4 and 5, added support for wake-up, mechanical mods
return 4U;
}
// hw-version is:
// 6 final version for wake-up, footprint mods, supply path mods
return hw_version;