Hi all,
there's a compiler error using 'RXINT0' in FC V5 AVR.
If you want to use this interrupt you have to build it with the custom option, the already inlcuded 'RXINT0' does not work because of the
wrong handler-code:
ISR(USART0_RX_vect)
{
FCM_ISR_UART();
}
The right code need to be:
ISR(USART_RX_vect)
{
FCM_ISR_UART();
}
So you need to simply build your custom Interrupt:
Enable Code:
sei();
UCSR0B |= (1 << RXCIE0);
Handler Code:
//Handler code for [RXINT]
#ifndef MX_UART0_RX_HANDLER
#define MX_UART0_RX_HANDLER
ISR(USART_RX_vect)
{
FCM_ISR_UART();
}
#else
#warning The <UART0 RX> interrupt has previously been enabled, so the macro <ISR_UART> may never get called.
#endif
Now assign it to the requird ISR (macro) and than it will work.
Maybe this hopefully will get fixed with the next update.
Have fun,
Niro
PS: this solution is related to my former post 'Problem with UART, porting V4 to V5' http://wwww.matrixmultimedia.com/mmforu ... 46&t=12170
CompilerError UART-Interrupt solved (AVR)
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: CompilerError UART-Interrupt solved (AVR)
Hi Niro,
Thanks for the workaround. Do you know what device(s) this problem effects and I will fix the FCD files? I did recently provide a load of FCD fixes for this very issue so I will attach them here (ATMEGA48, 88, 168, 328).
Plus if we don't head off the issue now then it is likely to continue on into the v6 code.
Thanks for the workaround. Do you know what device(s) this problem effects and I will fix the FCD files? I did recently provide a load of FCD fixes for this very issue so I will attach them here (ATMEGA48, 88, 168, 328).
Plus if we don't head off the issue now then it is likely to continue on into the v6 code.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: CompilerError UART-Interrupt solved (AVR)
Hi Ben,
mainly I'm using the attached AVR-types you correctd. Actually a QFP version of the ATMEGA328. It has different I/O pinout and additional ADC ports compared to the 328.
Thererfore I modified the ATMEGA328 FCD-file.
Attached you'll find the version with the corrected UART-interrupt.
regards,
Niro
mainly I'm using the attached AVR-types you correctd. Actually a QFP version of the ATMEGA328. It has different I/O pinout and additional ADC ports compared to the 328.
Thererfore I modified the ATMEGA328 FCD-file.
Attached you'll find the version with the corrected UART-interrupt.
regards,
Niro
- Attachments
-
- ATMEGA328_QFP.fcd
- (9.83 KiB) Downloaded 322 times