MCU: STMicroelectronics STM32F107 Connectivity Line JTAG: ST-Link, 100% compatibile with ULINK IDE: Keil uVision 4.00
While in debug mode I open "Peripherals" menu where I can change "online" settings for PLL's, I2C, GPIO etc. Problem is that I cant find all peripherals I want to modify. In GPIO Iv got only: GPIOA, GPIOB, GPIOD, AFIO (missing GPIOC,E,F) In I2C there is only first I2C, missing I2C.2. In timers there are only Timer2 and Timer3, missing Timer1.
What is wrong?
PS. Sorry for my bad english :(
Where I can find a good debug tutorial for uVision?
www.keil.com/.../GSAC_debugApplication.htm
http://www.keil.com/support/man/docs/uv4/uv4_examples.htm
http://www.keil.com/support/man/docs/uv4/uv4_debugging.htm
Connectivity line is not supported at the moment that is why you do not see all peripherals available.
Any clue if it is available in Keil uVision 4.02, or when it will be implemented?
I dont want to open a new thread, Iv got small question about I2C. Iv configured all the things as you can see below and connected SDA and SCL to osciloscope and I cant see any change in signals (all = VCC). There should be change on clock signal and data signal sending the I2C address. The lines are pulled-up to VCC, GPIOs configured as alternative floating. What could go wrong?
My code (simplified): int main(void) { SystemInit(); GPIO_Config(); RCC_Config(); I2C_Config();
I2C_GenerateSTART(I2C1, ENABLE); while(!I2C_CheckEvent(I2C1, I2C_EVENT_MASTER_MODE_SELECT)); I2C_Send7bitAddress(I2C1, I2C_TEMPERATURE_ADDR, I2C_Direction_Transmitter); while(!I2C_CheckEvent(I2C1, I2C_EVENT_SLAVE_RECEIVER_ADDRESS_MATCHED)); // code for data send here I2C_GenerateSTOP(I2C1, ENABLE); }
void I2C_Config(void) { I2C_InitTypeDef I2C_InitStructure;
RCC_APB1PeriphClockCmd(RCC_APB1Periph_I2C1, ENABLE); I2C_Cmd(I2C1, ENABLE); I2C_InitStructure.I2C_Mode = I2C_Mode_I2C; I2C_InitStructure.I2C_DutyCycle = I2C_DutyCycle_2; I2C_InitStructure.I2C_OwnAddress1 = 0x01; I2C_InitStructure.I2C_Ack = I2C_Ack_Enable; I2C_InitStructure.I2C_AcknowledgedAddress = I2C_AcknowledgedAddress_7bit; I2C_InitStructure.I2C_ClockSpeed = 100000; I2C_Init(I2C1, &I2C_InitStructure); }
void GPIO_Config(void) { RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE); GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6 | GPIO_Pin_7; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_OD; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_Init(GPIOB, &GPIO_InitStructure); }
Thanks for your help guys!
Ok guys, problem with no clock and data output solved: Iv put I2C_DeInit(I2C1); before configuring the I2C interface and now Iv got my signals going.
Im sending address 0x90 which is b#10010000. 1001000 is a i2c temperature ic address and the last 0 is read register bit. So i figured out that I should be sending 10010000 instead of 1001000 to make it working properly (8bit altogether). Unfortunately still no response from IC. Thats what I get from osciloscope: img697.imageshack.us/.../i2cn.jpg As you can see address is send properly, but start and stop is wrong. It should be a transition high->low for START and low->high for stop. Whats I can see there is now transition but just a level low for start and high for stop. Have you ever experienced that?
Please can someone help me out?
There is no generation of START/STOP signal :(
Is there any forecast when the connectivity line is supported by Keil?
It is really unconfortable to work with.
Aren't elements such as I2C the same as in the other STM32 "lines" ?
Can't you just use them?