How to change the UART buffer size? #565
Replies: 2 comments 4 replies
-
Also, I raised a previous issue over the inability to get serialupdi to work over Bluetooth. It actually does work if you have the right hardware. When I started digging into the UPDI protocol to write my own programmer, I noticed the problem pretty quickly. The UPDI protocol uses even parity and 2 stop bits. Most Bluetooth modules don't have the ability to change this configuration but if they do, UPDI over Bluetooth does actually work. |
Beta Was this translation helpful? Give feedback.
-
Wow, that's all it was? About buffer size: Buffer sizes that are not a power of 2 are ALSO not supported. nor were they ever - not for like 1.5-2 years when I realized the compiler was missing optimizations possible for (byte value) % 2N, and switched to the proper optimization (& ((2N)-1)) I did incidentally drop support for 256b RX buffers, when USE_ASM_RXC or USE_ASM_DRE are enabled (these save some flash, and makethe ISRs markedly more efficient. The compiler does a piss poor job of compiling those ISRs and I wasn;'t going to meet my own merge criteria if I didn't slim down the binary size). and didn't provide a way for a variant or command line argument to override USE_ASM_* macros. I've corrected these in the github version of both cores; supporting 256 was pretty much trivial. However, anything higher than that would get quite a bit more complicated; but you can just just off ASM_RXC and ASM_DRE in that case by defining them as 0. |
Beta Was this translation helpful? Give feedback.
-
This may be a dumb question but I do not understand this new version of megaTinyCore. I have been working on a programmer that runs on the new version of attinys and can take UART and translate it to UPDI programming protocol. It works flawlessly on the old version of megaTinyCore, but only because I was able to change the buffer size. The UPDI protocol sends up to 139 bytes so you need a buffer equal or greater than that. This project is still under development but there's a lot of really cool features, such as auto-sensing when to switch between programming and debug mode. This new version of megaTinyCore allows you to use the half-duplex/open-drain configuration that makes everything run internally and more smoothly, but it's incapable of programming anything at all with a 64 byte buffer size, and I can't figure out how to change it. I really think I'm missing something simple and am going to feel really dumb about this, but how the HELL do you change the buffer size?
Beta Was this translation helpful? Give feedback.
All reactions