Ah, that makes sense. Clearing the interrupt also clears the status flag, so you have to read status before clearing interrupts.
One other way to get the result you want is to start with interrupt on rising edge, then switching to falling edge within the ISR, and so on. CP2102's solution is better.
Search found 85 matches
- Wed Jun 24, 2020 3:29 pm
- Forum: NetBurner Software
- Topic: MOD54415 IRQ question.
- Replies: 10
- Views: 13302
- Thu Mar 19, 2020 1:24 pm
- Forum: NetBurner Software
- Topic: MOD5213 iprintf() error for UL and ULL types?
- Replies: 21
- Views: 18400
Re: MOD5213 iprintf() error for UL and ULL types?
Well, to be fair, it was designed 50 years ago, so they were on to something. Before C there was B, which was short for BCPL, so the next language just had to be called C. These were no-nonsense people, obviously. Now we have ... Python?
- Sun Mar 15, 2020 1:46 pm
- Forum: NetBurner Software
- Topic: MOD5213 iprintf() error for UL and ULL types?
- Replies: 21
- Views: 18400
Re: MOD5213 iprintf() error for UL and ULL types?
KE5FX, according to the link below, the length specifier "L" (capital) is for long double only. For 64-bit (long long) integers, use "ll" and "ull".
Joe
https://en.cppreference.com/w/cpp/io/c/fprintf
Joe
https://en.cppreference.com/w/cpp/io/c/fprintf
- Wed Apr 10, 2019 5:59 pm
- Forum: NetBurner Software
- Topic: MOD5213 siprintf()
- Replies: 0
- Views: 5447
MOD5213 siprintf()
Hello NB, I'm using 2.7.7 tools with MOD5213. The siprintf() in the system_nn library does not NULL-terminate its output string. I checked the system library, and the string functions there do add a NULL-terminator, along with a comment that the NULL-terminator is required when the format string is ...
- Tue Aug 28, 2018 10:34 am
- Forum: NetBurner Hardware
- Topic: 5213 DMA Timer Question
- Replies: 4
- Views: 5671
Re: 5213 DMA Timer Question
Yes, I'm using INTERRUPT. Here is the call to SetIntc(), the ISR, and a function to configure the DMA timer for IC. SetIntc( (long)&dtim0_isr, 19+0, 6, 4+0 ); // vector=19, level=6, pri=4 /****************************************************************************** * INTERRUPT - DMA Timer 0 In...
- Sat Aug 25, 2018 7:22 am
- Forum: NetBurner Hardware
- Topic: 5213 DMA Timer Question
- Replies: 4
- Views: 5671
Re: 5213 DMA Timer Question
Hi Paul, Thanks for your reply. No, I'm not turning interrupts on and off. Interrupts occur on rising edges, and the ISR is as short as I can make it. It just clears the CAP interrupt flag, reads the capture register, computes period, and posts the period value to an OS_Q. The values in the OS_Q are...
- Thu Aug 23, 2018 5:20 pm
- Forum: NetBurner Hardware
- Topic: 5213 DMA Timer Question
- Replies: 4
- Views: 5671
5213 DMA Timer Question
Hello, We are using a DMA timer configured for input capture on rising edges to measure the period of a low-frequency signal (0-100 Hz). The signal source is a proximity sensor, whose output is converted to fiber. Our board has a fiber receiver with slow rise/fall times. Rise times are 50-60 ns and ...
- Thu Aug 09, 2018 9:58 am
- Forum: NetBurner Software
- Topic: periodic timer interrupt
- Replies: 6
- Views: 4798
Re: periodic timer interrupt
See the project in the examples folder: nburn\examples\MOD5441X\MOD5441x-PIT-Timer
There are also ways to do this with no interrupts. You can use the PWM module or a DMA timer to produce a square wave at the desired frequency.
Joe
There are also ways to do this with no interrupts. You can use the PWM module or a DMA timer to produce a square wave at the desired frequency.
Joe
- Mon Feb 12, 2018 2:56 pm
- Forum: NetBurner Software
- Topic: IRQs on Nano and 54415
- Replies: 6
- Views: 6885
Re: IRQs on Nano and 54415
Ridgeglider, Paul is right that interrupt level is of much greater importance than priority (within level), but I was curious about the missing "priority" argument for the 54415 version of SetIntc(), and here's what I found: The V2 coldfire (5213, 5234, 5270, etc.) supports 7 settable prio...
- Mon Feb 12, 2018 2:16 pm
- Forum: NetBurner Software
- Topic: Module capability like a DLL?
- Replies: 2
- Views: 3138
Re: Module capability like a DLL?
This is how I create libraries with NBEclipse: 1) From File menu, choose New, then Project. 2) When the New Project window opens a) choose NetBurner Project b) press Next button 3) When the C++ Project window opens a) enter Project Name b) change Project Type from NetBurner Executable to NetBurner D...