cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F407VGT6 System Tick Configuration Issue

koti_siva20
Associate II
Posted on May 27, 2014 at 09:14

Hi,

I am facing an issue to configure system tick for STM32F407VGT6 discovery board.

if (SysTick_Config(SystemCoreClock / 1000) is given in example to configure system tick for 1 milli sec. This board runs with 168MHZ. When i checked in scope it is not giving tick for 1 milli sec. There is a delay. Why it is like that. Please help me.
7 REPLIES 7
Posted on May 27, 2014 at 16:18

What delay would that be? If you've measured it wouldn't it be useful to indicate what you saw?

One of the classic failure in clocking on the DISCO boards is that they use a 8 MHz HSE, and the EVAL boards use a 25 MHz HSE. The project needs to be correctly configured to use the right source, the HSE_VALUE define needs to be correct, and the PLL settings need to coherent.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
koti_siva20
Associate II
Posted on June 04, 2014 at 08:45

thanks Clive, it solved my problem. Changed both HSE_VALUE and PLL_M value to get required system tick time for discovery board.

I have one more question, GPIO_ReadInputData() returns GPIOx->IDR value - it is 32 bit data (where 16 bits are reserved and 16 have actual port data). Is there any library function to read the specific BYTE value in IDR register?? I need Port Data from 0 to 7 as one set (1 BYTE) and 8 to 15 as another set (1 BYTE).

Posted on June 04, 2014 at 13:22

uint8_t Lo, Hi;
Lo = (uint8_t)((GPIOx->IDR >> 0) & 0xFF); // Px[0..7]
Hi = (uint8_t)((GPIOx->IDR >> 8) & 0xFF); // Px[8..15]

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
koti_siva20
Associate II
Posted on June 19, 2014 at 13:18

Thanks Clive. Clive i have a question for you : I am using STM32F407, and core_cm4.h library file included. But i am unable to find _NOP(). It is there in core_cm3.h file.

As STM32F407 is Cortex4 i am supposed to use core_cm4.h. Where can i get _NOP()? Is there any equivalent for _NOP() for Cortex4?

koti_siva20
Associate II
Posted on June 19, 2014 at 13:25

Clive i found it in core_cmInstr.h file.

And _NOP() can be given as asm(''nop'')

koti_siva20
Associate II
Posted on July 09, 2014 at 16:35

Hi Clive,

I am in the process of connecting NHD-320240WX-CoTFH-V#I041 (Built in RA8835 Controller) with STM32F4 DISCOVERY board using FSMC. As discovery board support  FSMC-D8:D15 (FSMC-D0:D7 does not support because - PD14,PD15 used for LEDs) , i am using them for connecting LCD D0:D7.

PD4 for RD, PD5 for WR, PD7 for CS, PD11 for RS, PE10 for RES. (as per LCD, STM interface)

1. i am seeing a over current LED (LD8) as i am driving PD5 - How can i over come that.

2. After configuring GPIO for FSMC, Bank 1 for FSMC - i am trying to write my LCD initialization commands in the address 0x60000000. Is it correct?

3. Don't i need to set RS,CS, WR, RD as per RA8835 protocol OR FSMC will take care of them?

4. As per my understanding, once i write my data in the address 0x60000000(Bank 1) automatically LCD will take that data or do we need to push? what exactly the use of FSMC in this case.

5. Any sample code exists for the same.

Thanks in advance

Posted on July 09, 2014 at 17:11

I really don't want to get pulled into your design/implementation work.

You can probably remedy the PD5 pin conflict by removing R50, please refer to the schematic for the board.

I don't have/use this LCD, so can't speak to the appropriateness of using the FSMC. If you have the high-order data bits wired up I suspect you will need to use 16-bit mode, and write 16-bit shifted words to 0x60000000 or bytes to 0x60000001. Worse case you could probably use GPIO mode, and walk through the configuration/registers of the panel.

Perhaps NewHaven provides example code, or sufficient documentation, for their panels.
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..