Just checked.It starts detection when enum=2 i.e phase 3 when it goes into TC2_External. Good news is that now we have a method to detect the external clocks. I wonder if it would capture such a high freq signal.
Serial.print statements were also not working when the ISR_NAKED was declared and with reti( ). We need to such an equivalent to the code here as well.
- It is currently Fri Jan 22, 2021 7:48 pm • All times are UTC - 8 hours [ DST ]
[SOLVED]Audio codec shield with Arduino Due
Re: Audio codec shield with Arduino Due
- Attachments
-
- other prograam with interrupts.jpg (205.79 KiB) Viewed 9912 times
- youthreewire
- Posts: 117
- Joined: Tue Jun 09, 2015 8:06 pm
Re: Audio codec shield with Arduino Due
change your Serial.begin(9600) to something much higher. try 115200, and if that doesnt work, try all the higher options (i dont know what bit rates the serial monitor can accept).
- guest
- Site Admin
- Posts: 449
- Joined: Thu May 20, 2010 11:58 pm
Re: Audio codec shield with Arduino Due
another thing you can do for these tests, is not send data every interrupt. the data is overflowing in the transmit buffer. also, set the clock divider to 256, and make sure you are getting a 44.1k pulse at your new ss pin (toggle a pin within the interrupt routine).
- guest
- Site Admin
- Posts: 449
- Joined: Thu May 20, 2010 11:58 pm
Re: Audio codec shield with Arduino Due
So tell me what does ISR_NAKED do in your code and how should I write an equivalent of not including reti() in my code?
- youthreewire
- Posts: 117
- Joined: Tue Jun 09, 2015 8:06 pm
Re: Audio codec shield with Arduino Due
you should NOT use ISR_NAKED. that will make anything the main{} loop fail. the UNO needed that to help save processing time, but with the DUE it wont be necessary, and will make things more difficult. as a result, you also do not need to use reti().
- guest
- Site Admin
- Posts: 449
- Joined: Thu May 20, 2010 11:58 pm
Re: Audio codec shield with Arduino Due
Right now I am not using ISR_NAKED. But what I observed is that if I give the 11Mhz CLKOUT Signal as the input to pin30 the main loop() does not run at all.What shall I do now?It runs for signals with 200ms time period.
- youthreewire
- Posts: 117
- Joined: Tue Jun 09, 2015 8:06 pm
Re: Audio codec shield with Arduino Due
you are doing too much in the main loop, most likely. get rid of anything in the mian loop, and just toggle an external pin in the interrupt, so you can see that its working. watch this pin on your scope, and make sure its at the frequency you expect. then, you can slowly add things back to your main loop, one at a time, and see what makes it break. but, before doing that, you could also get SPI working. with the MAPLE (another ARM processor), i found that the USB peripheral had an interrupt that took too long, and conflicted with the SPI. hopefully that is not the case here.
- guest
- Site Admin
- Posts: 449
- Joined: Thu May 20, 2010 11:58 pm
Re: Audio codec shield with Arduino Due
The main loop is just a switch statement with print statement.I will do what you said i.e to toggle a pin and that will give us an idea. I will check it with a scope and get back.
- youthreewire
- Posts: 117
- Joined: Tue Jun 09, 2015 8:06 pm
Re: Audio codec shield with Arduino Due
I am turning a GPIO pin on and off with the interrupt coming from CLKOUT pin.I am getting a frequency of 142 Khz i.e 0.14Mhz on the GPIO pin where as the clock signal is at a frequency of 11.363 Mhz signal. What shall I do now?
- youthreewire
- Posts: 117
- Joined: Tue Jun 09, 2015 8:06 pm
Who is online
Users browsing this forum: No registered users and 1 guest