2013-06-17 05:52 AM
I need to update this function to stm32f4xx.h.
void delay_us(u32 Nus){ SysTick_SetReload(delay_fac_us * Nus); SysTick_CounterCmd(SysTick_Counter_Clear);// error: 'SysTick_Counter_Clear' undeclared (first use in this function)
SysTick_CounterCmd(SysTick_Counter_Enable);// error: 'SysTick_Counter_Enable' undeclared (first use in this function)
do { Status = SysTick_GetFlagStatus(SysTick_FLAG_COUNT); }while (Status != SET); SysTick_CounterCmd(SysTick_Counter_Disable); SysTick_CounterCmd(SysTick_Counter_Clear);}For documentation, do not come to a conclusion./ ************************************************* ******************************* Function Name: SysTick_CounterCmd* Description: Enables or disables the SysTick counter.* Input: - SysTick_Counter: new state of the SysTick counter.* This parameter can be one of the Following values:* - SysTick_Counter_Disable: Disable counter* - SysTick_Counter_Enable: Enable counter* - SysTick_Counter_Clear: Clear counter value to 0* Output: None* Return: None************************************************** ***************************** /void SysTick_CounterCmd (u32 SysTick_Counter){ / * Check the parameters * / assert_param (IS_SYSTICK_COUNTER (SysTick_Counter)); if (SysTick_Counter == SysTick_Counter_Enable) { SysTick-> CTRL | = SysTick_Counter_Enable; } else if (SysTick_Counter == SysTick_Counter_Disable) { SysTick-> CTRL & = SysTick_Counter_Disable; } else / * SysTick_Counter SysTick_Counter_Clear == * / { SysTick-> VAL = SysTick_Counter_Clear; }}2013-06-17 06:49 AM
You'd want to review CMSIS library examples, the way SysTick is configured was changed.
I would also generally recommend just having a ticker interrupt running all the time rather than stopping/starting for delays. For fine delays, one could also spin on one of the cores counters (DWT_CYCCNT). From STM32F4xx_DSP_StdPeriph_Lib_V1.1.0\Project\STM32F4xx_StdPeriph_Examples\SysTick\SysTick_Example/* Setup SysTick Timer for 1 msec interrupts.
------------------------------------------
1. The SysTick_Config() function is a CMSIS function which configure:
- The SysTick Reload register with value passed as function parameter.
- Configure the SysTick IRQ priority to the lowest value (0x0F).
- Reset the SysTick Counter register.
- Configure the SysTick Counter clock source to be Core Clock Source (HCLK).
- Enable the SysTick Interrupt.
- Start the SysTick Counter.
2. You can change the SysTick Clock source to be HCLK_Div8 by calling the
SysTick_CLKSourceConfig(SysTick_CLKSource_HCLK_Div8) just after the
SysTick_Config() function call. The SysTick_CLKSourceConfig() is defined
inside the misc.c file.
3. You can change the SysTick IRQ priority by calling the
NVIC_SetPriority(SysTick_IRQn,...) just after the SysTick_Config() function
call. The NVIC_SetPriority() is defined inside the core_cm4.h file.
4. To adjust the SysTick time base, use the following formula:
Reload Value = SysTick Counter Clock (Hz) x Desired Time base (s)
- Reload Value is the parameter to be passed for SysTick_Config() function
- Reload Value should not exceed 0xFFFFFF
*/
if (SysTick_Config(SystemCoreClock / 1000))
{
/* Capture error */
while (1);
}
2013-06-17 08:25 AM
Do not want to change the use of hardware in the program. It's a big program, and first I want to upgrade to stm32f4xx, do tests and then analyze best.
Sorry for my english.2013-06-17 11:24 AM
where can I download the STM32F4xx DSP_StdPeriph_Lib_V1.1.0?
2013-06-17 01:00 PM
where can I download the STM32F4xx DSP_StdPeriph_Lib_V1.1.0?
You can find all these materials by Googling the part# of the STM32 you have, and going to the ''Design Resources'' tab.http://www.st.com/web/en/catalog/tools/PF257901
Do not want to change the use of hardware in the program. It's a big program, and first I want to upgrade to stm32f4xx, do tests and then analyze best. You appear to be using an old STM32F1 V2.xx library, there are things there that don't map cleanly to the V3.xx CMSIS compatible release. This is further compounded by moving to the F4 series parts which are architecturally quite different from the F1 series parts. I've ported things back-and-forth between a couple of the libraries and parts. You learn to keep the hardware abstraction away from the application code.2013-06-18 05:03 AM
This difficult. I bought the kit http://www.wvshare.com/product/Open407I-C-Package-B.htm to learn and perform some tests, but the examples are using the stm32F1 library. I want to upgrade to STM32F4, to stay compatible with processor kit, STM32F407IGT6.
Already sought help on google but have not found a solution for this case.I am also trying to open the help file stm32f4xx_dsp_stdperiph_lib_um.chm but is not displaying the data, only the indices. It happens to you ?2013-06-18 06:37 AM
The help file works for me on Win7 Pro x64
Do you have it on a network drive, or set read-only?[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/FYI%20Problems%20with%20STM32%20Help%20Files%20%28.chm%29%20and%20Keil%20uVision&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=710]https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2FFYI%20Problems%20with%20STM32%20Help%20Files%20%28.chm%29%20and%20Keil%20uVision&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=7102013-06-19 05:32 AM
I fo.und the solution. In properties,disable warning that the file came from another computer