Hi, i'm using samd21j16b. I tried using native usb functionality, with some progress, but i'm getting unestable results in communication.
If i do a loop where i send data to usb with 2sec delay, it works realtivley well with a a bit of grabage in between, but mostly well, if i run main program where i send a lot of data, i get mostly garbage and sometime what i send.
I like to debugg with 2 methods at the same time, atmel ice debugger and print to pc the data so i can see it in human language. most of the time i do this with uart and and external uart to usb converter, but this project requires to have usb functionalitty for configurations. I changed my debugging functions to send the datta via usb and as previously said, i get mostly garbage, and this won't work for my application.
So i'm thinking it could be a problem with some interrupts, that i would need to disable while usb communication is happening or with the usb clock.
Another problem i got, is that the function for sending float via usb send program to dummy_handler, in my experience this happens when you have a problem with memory allocation and as this function uses sprintf, i think the micro doesn't have enough memmory for it.
The problem occurs when its tries to do the sprintf command in that function. (i have sprintf on other functions and it works well).
I attached the project, any help would be apreciated :)