How my software can detect on which MCU it is executed ?
ATXmega128A1 DEVID=1Eh, 97h, 4Ch
ATXmega128A1U DEVID=1Eh, 97h, 4Ch
They have the same DEVID.
How my software can differentiate these chips ?
How my software can detect on which MCU it is executed ?
ATXmega128A1 DEVID=1Eh, 97h, 4Ch
ATXmega128A1U DEVID=1Eh, 97h, 4Ch
They have the same DEVID.
How my software can differentiate these chips ?
One "hacky" way is to write something into USB register and see if it stays there.
Also, Atxmega128A1 is not recommended for new designs.
hey,
Most of the times. A #define is used to do that stuff.
I don't know for sure if there is the code will have a difference in the ATXmega128A1 and the ATXmega128A1U.
If it has, it should be like:
#if define ATXmega128A1 DEVID = 1EH,97H,4Ch; #endif #if define ATXmega128A1U DEVID = 1E,97H,4CH; #endif //OR #ifdef ATXmega128A1 DEVID = 1EH,97H,4CH; #endif #ifdef ATXmega128A1U DEVID = 1EH,97H,4CH; #endif
Most of the times. A #define is used to do that stuff.
Depends what you mean by, "that stuff"
Ale3000 - please clarify!
MCU.REVID >= 'L'?
Ale3000 - please clarify!
We have many old devices with A1.
New devices are producing with A1U.
A1 has no CRC16 module,
A1U has CRC16 module.
I want to realize such function :
if( A1U) CalcHardwareCRC();
else CalcSoftwareCRC();
MCU.REVID >= 'L'?
Спасибо. Позже попробую.
Answer could be in your question.
You can try feeding couple of bytes into CRC engine, then compare result register with precalculated value.
With A1 chip I would expect 0x0000 or 0xFFFF instead of meaningfull value.