Username:     
Password:     
             

Forum

# 1   2009-02-19 05:00:51 About UART interrupt ?

chialun
New member
Registered: 2009-02-19
Posts: 2

About UART interrupt ?

I use two groups of UART (UART1,UART2) .
When two groups of uart come in at the same time , Will lose one group UART of Data materials among them .

After a group UART carry out, and then go to carry out another group UART ?

Thank !!

Offline

 

# 2   2009-02-19 08:46:47 About UART interrupt ?

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: About UART interrupt ?

UARTs are supposed to be fully independent...

Offline

 

# 3   2009-02-19 11:08:49 About UART interrupt ?

chialun
New member
Registered: 2009-02-19
Posts: 2

Re: About UART interrupt ?

Francis wrote:

UARTs are supposed to be fully independent...

Into UART1 interrupt function, UART2 has data to come in too, but UART2 not into interrupt function?

so, UATR2 data loss.

===================UART1=====================
     NVIC_InitStructure.NVIC_IRQChannel = USART1_IRQChannel;
     NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
     NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
     NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
     NVIC_Init(&NVIC_InitStructure);

===================UART2=====================
     NVIC_InitStructure.NVIC_IRQChannel = USART2_IRQChannel;
     NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1;
     NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
     NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
     NVIC_Init(&NVIC_InitStructure);

Last edited by chialun (2009-02-19 11:11:17)

Offline

 

# 4   2009-02-19 16:36:12 About UART interrupt ?

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: About UART interrupt ?

If you use CircleOS, you have to redirect the IRQ to your own handlers Of course, there is an interrupt for each UART:
37 44 settable USART1 USART1 global interrupt 0x0000_00D4
38 45 settable USART2 USART2 global interrupt 0x0000_00D8
39 46 settable USART3 USART3 global interrupt 0x0000_00DC
To redirect an irq, use UTIL_SetIrqHandler :
http://www.stm32circle.com/circleos_doc … 1e39ace4d3

Offline

 

# 5   2011-06-12 14:45:31 About UART interrupt ?

fine
New member
Registered: 2011-05-11
Posts: 2

Re: About UART interrupt ?

I've got a problem. My compiler doesn't accept USART. The error log as follows:
error: 'USART2' undeclared (first use in this function) 
error: (Each undeclared identifier is reported only once 
error: for each function it appears in.)

Offline

 

# 6   2013-11-07 09:46:31 About UART interrupt ?

beckywen
New member
Registered: 2013-09-26
Posts: 9

Re: About UART interrupt ?

Francis wrote:

If you use CircleOS, you have to redirect the IRQ to your own handlers Of course, there is an interrupt for each UART:
37 44 settable USART1 USART1 global interrupt 0x0000_00D4
38 45 settable USART2 USART2 global interrupt 0x0000_00D8
39 46 settable USART3 USART3 global interrupt 0x0000_00DC
To redirect an irq, use UTIL_SetIrqHandler :
http://www.stm32circle.com/circleos_doc … 1e39ace4d3

what does redirect to our own handlers mean?
so this usart communication is possible done without circle os on evoprimer OPEN4 stm32f107?


thank you in advance.

Offline

 

Board footer