Comments (9)
I suspect this normally isn't an issue if you program the A-Star from the Arduino IDE because the sketch itself uses USB (so it can appear as a COM port to the computer). Since you aren't using Arduino, the problem is probably caused by the USB interrupt trying to run an interrupt handler that isn't defined in your program. We'll keep this issue open and look at fixing it in case we make a new version of the bootloader, but for now, it looks like you've found an appropriate workaround by clearing USBCON.
Have you checked whether this problem also occurs with the stock Caterina bootloader (e.g. on an Arduino Leonardo or Arduino Micro)?
from a-star.
I have no other Arduino board, so I cannot check with the stock Caterina bootloader. But there is an old thread in AVR freaks that gave me the clue to solve my problem (http://www.avrfreaks.net/forum/sei-problem), so I think that it happened with other bootloaders.
The workaround is easy, and I understand the problems of fixing and testing code like this. But perhaps it could be added as a comment to the Pololu A-Star 32U4 User Guide.
Thanks for your little board, it's being great fun to use it!
from a-star.
I am facing the same issue with Arduino Leonardo. I am trying to create a library for Simulink for the new robot and have run into this issue. What would be a workaround for this?
Note, as you mentioned, this seems to work fine with the Arduino IDE.
from a-star.
What worked for me was
USBCON = 0; // Disable USB interrupts
as you can see in the code example before.
from a-star.
Since the code is auto generated, the above workaround isn't feasible for me. Is there any other workaround? @kevin-pololu
from a-star.
Hi, @tekstop. I think your only options would be one of the following:
- Disable the USB interrupt at the beginning of the program with USBCON = 0
- Define your own minimal USB interrupt handler
- Modify the bootloader to disable the USB interrupt before running the sketch
I have not tried the second and third options, so I am not certain they would work or are practical. The first two options would require you to be able to customize the code generator or edit its output, and the third would require the use of an AVR ISP (in-system programmer) to load the modified bootloader onto the Leonardo.
from a-star.
Hi @kevin-pololu, thanks for your quick reply!
Where can I find the bootloader to modify?
from a-star.
nvm found it! Thanks for your help! I will give it a try and let you know whether that works!
from a-star.
The running USB clock is a known problem of the leonardo bootloader.
However this board uses a special bootloader which causes problems for me. It does not work at all with the current IDE. See this: arduino/Arduino#3910
Also the brown out detection at 4.5V keeps me from using the board on an usb hub which normally should work fine. Its in specs, makes somehow sense of course, but is not productive for daddeling.
from a-star.
Related Issues (10)
- Warning: pololu-a-star/hardware/avr/4.0.2/variants/a-star328pb/new_vectors_328pb.cpp:15:6: warning: ‘void __vector_26()’ specifies less restrictive attribute than its target ‘void __bad_interrupt_328pb()’: ‘nothrow’ [-Wmissing-attributes] HOT 5
- Wire library for A-Star 328PB broken with version 5.0.0 HOT 2
- a-star series board support URL for Arduino IDE >1.6.4 HOT 1
- Virtual Serial port not working after Restarting the Arduino Micor Board HOT 1
- Question: using the Arduino Ethernet shield on top of the A-Star 32U4 Prime SV HOT 2
- I have locked my atmega328PB when i try to use the bootloader HOT 2
- Error while uploading Arduino sketch on Mac OS Catalina (10.15.1) HOT 3
- Where are the FUSES etc documented? HOT 1
- Myensorc compilation error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from a-star.