2008-02-12 09:17 PM
2011-05-17 12:49 AM
Hi,
To solve the spurious interrupt problems, i use the new library (um0233). My application, its works with an older library, does not work. So I have written a very small program that toggles P6.0.int main(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
//INIT SCU
SCU_PLLFactorsConfig(192,24,2);
SCU_PLLCmd(ENABLE);
SCU_PCLKDivisorConfig(SCU_PCLK_Div1);
SCU_HCLKDivisorConfig(SCU_HCLK_Div1);
SCU_FMICLKDivisorConfig(SCU_FMICLK_Div1);
SCU_BRCLKDivisorConfig(SCU_BRCLK_Div1);
SCU_APBPeriphClockConfig(__GPIO6 , ENABLE);
//INIT GPIO6
GPIO_DeInit(GPIO6);
GPIO_InitStructure.GPIO_Direction = GPIO_PinOutput;
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0;
GPIO_InitStructure.GPIO_Type = GPIO_Type_PushPull ;
GPIO_InitStructure.GPIO_IPInputConnected = GPIO_IPInputConnected_Disable;
GPIO_InitStructure.GPIO_Alternate = GPIO_OutputAlt1;
GPIO_Init (GPIO6, &GPIO_InitStructure);
//SQUARE WAVE
while (1)
{
GPIO_WriteBit(GPIO6,GPIO_Pin_0,Bit_SET);
GPIO_WriteBit(GPIO6,GPIO_Pin_0,Bit_RESET);
}
}
I link the 2 startupfiles included with the library. With the old library I get a square wave, with the new lib nothing appears on the output. I use Keil RV ARM with a STR912FW44 device on custom hardware. Is this libary (for FA devices) compatible with FW devices ? Thanks Luc Vercruysse
2011-05-17 12:49 AM
Hello robosoft.ontwikkeling,
Normally, the new library version is validated on the rev FA silicon. Please refer to the application note: migration from STR91xF to STR91xFA. There are some new features supported by some IP like the ADC (external pin trigger feature for example) which are recovered by our library examples. However, there are no enhancement in the GPIO. Best regards, mirou.2011-05-17 12:49 AM
Hi,
When I use the original startup code from KEIL in above testprogram, the GPIO works fine. It seems that the part that inits the FMI causes the problem with the GPIO !??? However, this is not the solution for other problems I have (CAN bus is not working, function that returns the clockfrequency gives a result 24MHz i.s.o. 96MHz ect...) With the old library and startupcode i did not have that kind of problems (except interrupt ..) I wonder if KEIL startup code can be modified to have the same work around for the interrupt problems ? I am not very familiar with assembler . I have ordered a FA device from RSComponents, so I I can try it with the new device tomorrow ! I hope I have some positive results ! The STR912 replaces a 80188EB witch is end of life. Quiet some software has been rewritten already, hardware has been redesigned ...Deadlines reaching the end as our stock of 80188EB decreases ... Regards Luc Vercruysse2011-05-17 12:49 AM
Hello,
It is a full version. IDE-Version: µVision3 V3.55a Copyright (c) Keil Elektronik GmbH / Keil Software, Inc. 1995 - 2007 Tool Version Numbers: Toolchain: RealView MDK-ARM Version: 3.15b Toolchain Path: BIN31C Compiler: Armcc.Exe V3.1.0.914 Assembler: Armasm.Exe V3.1.0.914 Linker/Locator: ArmLink.Exe V3.1.0.914 Librarian: ArmAr.Exe V3.1.0.914 Hex Converter: FromElf.Exe V3.1.0.914 CPU DLL: SARM.DLL V3.15b Dialog DLL: DARMST9.DLL V1.03 Target DLL: BIN\UL2ARM.DLL V1.32 Dialog DLL: TARMST9.DLL V1.01a Kind regards Luc Vercruysse2011-05-17 12:49 AM
which version are you using and is it trial or full version?
2011-05-17 12:49 AM
Hello,
I have the same Keil-Version and have included the STR91x library V2.0 in my project. In the project I use STR91x.S as Startup-File. I use the GPIO6 Pin3-6 for leds. This works also with the new STR91x library V2.0. Here's a copy from parts of my source: SCU_MCLKSourceConfig(2); SCU_PCLKDivisorConfig(SCU_PCLK_Div8); SCU_PLLFactorsConfig(128,25,2); SCU_PLLCmd(ENABLE); SCU_MCLKSourceConfig(0); SCU_APBPeriphClockConfig(__GPIO6, ENABLE); // Test this -> SCU_APBPeriphReset(__GPIO6, DISABLE); My project works with CAN-Bus (1M), 2xSPI-Bus, 2xUART and GPIO's What are the frequecies shown in Power,System and Clock Control unit in the peripherals of uVision. If I load your PLL-Faktors the CPU-Clk is at 100MHz. Best Regards