cancel
Showing results for 
Search instead for 
Did you mean: 

The USART Problem of STM32F303 discovery Board

onellshih2005
Associate II
Posted on June 03, 2015 at 05:46

The original post was too long to process during our migration. Please click on the attachment to read the original post.
4 REPLIES 4
Posted on June 03, 2015 at 16:18

Seem to use the same variables in both IRQ.

Suggest you use your debugger, and understand what's going on internally, and if it's stuck somewhere, or not behaving quite how you want.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
onellshih2005
Associate II
Posted on June 08, 2015 at 10:34

Dear Clive :

It's quite simple why I use the same code for the Both IRQ .

because UART2 and UART3 will not work simutaneously .

and the Code is wroten for the testing purpose to verify the H/W feature of our DUT ( Dvice under Test ).

Orginally , I test it via UART2 and I send the command from Laptop ,as well as the command interpreter of MCU32F303of discovery board worked as what I programed .

when the DUT is ready ,

I found the H/W engineer wired the UART3 of DUT board for me So Imodified the code to UART3 and it didn't work.

I checked the code and didn't find what's wrong .

soI wiredDUT to UART2 and workOK.

thenI addedUART 3 back into the code again , the UART3 till not work and the uart2also did't work.

and after Idebugged , and found UART2 will work if I markConfigUart3Int();

so the issuses are

1.why UART2 will be halted by UART3 INT configuation .

2.Why UAR3 didn't work ?

Is it resouce conflicted ? or something I missed ?

I attached the Code for your reference . pleasetake a look and test it .

BTW , the Port E( debugport 16) is not work as what I expected . only Bit8~15 are OK , Low byteis not worked.

3. Low byte of Port E didn't work as what I expected .

Could you pleasetake a look , too ?

________________

Attachments :

MDK-ARM.7z : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0e3&d=%2Fa%2F0X0000000bbp%2FnzQoUjG2L9.xn.BL_lK.3o59cBlsPKy1E8Jbg3Vz7Vk&asPdf=false

UMECBSD_20150530_Current.7z : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0dy&d=%2Fa%2F0X0000000bbq%2FLmT1lAc9gCgqCUQcTtsJ8eA_23HwDLop6pE2tBauoBE&asPdf=false
Posted on June 08, 2015 at 17:10

Pleasetake a look and test it.

That would require a very large time commitment on my part, to a project I'm not working on. Suggest you break things down in to smaller parts. Get USART3 working with interrupts on a smaller test framework. The PC10/PC11 configuration seems ok.

void DebugPort8( uint8_t Number )
{
DEBUGPORT->ODR = (DEBUGPORT->ODR & 0xFF00) | ((uint16_t)Number & 0x00FF);
}
void DebugPort8up( uint8_t Number )
{
DEBUGPORT->ODR = (DEBUGPORT->ODR & 0x00FF) | ((uint16_t)Number << 
8
);
}
void DebugPort16( uint16_t Number )
{
DEBUGPORT->ODR = Number;
}

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
onellshih2005
Associate II
Posted on June 15, 2015 at 11:08

Dear Clive1 :

Got it ! 

and I will try it .

Thanks!  

O'Neill