Snooze icon indicating copy to clipboard operation
Snooze copied to clipboard

USBSerial print and multiple REDUCED_CPU_BLOCKs

Open atestani opened this issue 5 years ago • 1 comments

Before I do major surgery on my code, I wanted to ask about doing USBSerial "printing" (i.e. use Serial.print) and REDUCED_CPU_BLOCKS. This is a custom board that is equivalent to a Teensy 3.2 (MK20DX256VLH7) and I am "printing" to a Windows computer over USBserial. I want to run the majority of code at 8MHz but with a 16MHz crystal (already designed into the board and also needed for a different board configuration), it won't compile at anything less than 24MHz so as to get the proper USB clock.

I have gathered up the places where I am using Serial.print into as few a places as I can but there are still a number of them in different routines. So my question is can I use multiple REDUCED_CPU_BLOCKs including within a separate function where there is "8MHz code" and Serial.print statements?

Maybe I am overthinking this and only need to have the reduced blocks around everything except where I instantiate with Serial.begin()?

Thanks Al Testani

atestani avatar Jul 01 '20 17:07 atestani

REDUCED_CPU_BLOCKS is not implemented in the latest code, I'm planning on adding it back in though. Once it is added back yes you can use multiple ones in the same sketch but USBSerial will not work in the REDUCED_CPU_BLOCKS.

duff2013 avatar Jul 08 '20 15:07 duff2013