Author Topic: STM32F429I (STM32-DISCO) & CoIDE? Getting started...  (Read 11912 times)

0 Members and 1 Guest are viewing this topic.

Offline QrackMTopic starter

  • Contributor
  • Posts: 11
  • Country: pl
  • You can count on me...
STM32F429I (STM32-DISCO) & CoIDE? Getting started...
« on: August 06, 2014, 08:57:27 pm »
First, being new to community I'd like to politely excause for my newbien-ness :P Hope I didn't do anything wrong starting this topic here or something... :P

But, let's stick to the topic:
Just got my brand new STM32F4 eval board (exactly http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF259090 ). Trying to quick-start with it failed due to lack of experience. When I was ordering I was thinking about CooCox IDE, but it appears it doesn't support this exact ARM. To sum up, problems which I face are:
  • Where can I get demo project files from (to be able to revert it any time and take a peek into code maybe?)
  • Can I get CoIDE to work (blink a LED, handle button, use I2C is all I need at the moment)?
  • if answer to above is not, what IDE and compiler would you recommend? Read about emblocks and gcc, but your opinion would be very worthy
  • Where can I get libraries from? (I mean, I suppose st.com, but for me, their website is a mess, can't find a thing and be sure that is exactly what I wanted! really!)

Obviously, I'm in a bit of rush with that, as it usually is...
 

Offline Dongulus

  • Regular Contributor
  • *
  • Posts: 232
  • Country: us
Re: STM32F429I (STM32-DISCO) & CoIDE? Getting started...
« Reply #1 on: August 06, 2014, 09:08:52 pm »
I took a day course about getting started with the STM32F429 offered by STMicroelectonics. For the course, we used the free, code-limited version of IAR. They gave us some example program source code on a USB. The same files are available on the product website [link] listed under "Related Tools and Software".
 

Offline andyturk

  • Frequent Contributor
  • **
  • Posts: 895
  • Country: us
Re: STM32F429I (STM32-DISCO) & CoIDE? Getting started...
« Reply #2 on: August 06, 2014, 09:45:12 pm »
I've never used CoIDE, but I'd be shocked if it didn't support STM32F4xx. The web page seems to suggest support was added for that product line in 2012:

Quote
Added: Support ST STM32F4 series and Holtek HT32F1755/2755 series

Even if the whiz-bang stuff that's unique to the '429 isn't supported, the other peripherals (I2C in particular) should be essentially the same as what you get with the rest of the F4 family.

Also, ChibiOS/RT (which is an RTOS with excellent STM32 support) has a '429 demo.
 

Offline QrackMTopic starter

  • Contributor
  • Posts: 11
  • Country: pl
  • You can count on me...
Re: STM32F429I (STM32-DISCO) & CoIDE? Getting started...
« Reply #3 on: August 07, 2014, 04:17:53 pm »
@andyturk:
Quote
I've never used CoIDE, but I'd be shocked if it didn't support STM32F4xx. The web page seems to suggest support was added for that product line in 2012:
Yea, but seems this exact model (STM32F429) is not yet supported anyway. List of supported models from http://www.coocox.org/CooCox_CoIDE.htm:
Quote
  • STM32F030R8T6, STM32F030C6T6, STM32F030C8T6, STM32F030F4P6, STM32F030K6T6
  • STM32F031C4, STM32F031C6, STM32F031F4, STM32F031F6, STM32F031G4, STM32F031G6, STM32F031K4, STM32F031K6 NEW
  • STM32F042C4, STM32F042F4, STM32F042G4, STM32F042K4, STM32F042T4, STM32F042C6, STM32F042F6, STM32F042G6, STM32F042K6, STM32F042T6 NEW
  • STM32F050C4, STM32F050C6, STM32F050F4, STM32F050F6, STM32F050G4, STM32F050G6, STM32F050K4, STM32F050K6
  • STM32F051C4, STM32F051C6, STM32F051C8, STM32F051K4, STM32F051K6, STM32F051K8, STM32F051R4, STM32F051R6, STM32F051R8,
  • STM32F071V8, STM32F071VB, STM32F071RB, STM32F071CB NEW
  • STM32F072C8, STM32F072CB, STM32F072R8, STM32F072RB, STM32F072V8, STM32F072VB NEW
  • STM32F100C4, STM32F100C6, STM32F100C8, STM32F100CB,
  • STM32F100R4, STM32F100R6, STM32F100R8, STM32F100RB, STM32F100RC, STM32F100RD, STM32F100RE,
  • STM32F100V8, STM32F100VB, STM32F100VC, STM32F100VD, STM32F100VE,
  • STM32F100ZC, STM32F100ZD, STM32F100ZE,
  • STM32F101C4, STM32F101C6, STM32F101C8, STM32F101CB,
  • STM32F101R4, STM32F101R6, STM32F101R8, STM32F101RB, STM32F101RC, STM32F101RD, STM32F101RE, STM32F101RF,
  • STM32F101T4, STM32F101T6, STM32F101T8, STM32F101TB,
  • STM32F101V8, STM32F101VB, STM32F101VC, STM32F101VD, STM32F101VE, STM32F101VF, STM32F101VG,
  • STM32F101ZC, STM32F101ZD, STM32F101ZE,
  • STM32F102C4, STM32F102C6, STM32F102C8, STM32F102CB,
  • STM32F102R4, STM32F102R6, STM32F102R8, STM32F102RB,
  • STM32F103C4, STM32F103C6, STM32F103C8, STM32F103CB,
  • STM32F103R4, STM32F103R6, STM32F103R8, STM32F103RB, STM32F103RC, STM32F103RD, STM32F103RE, STM32F103RF, STM32F103RG,
  • STM32F103T4, STM32F103T6, STM32F103T8, STM32F103TB,
  • STM32F103V8, STM32F103VB, STM32F103VC, STM32F103VD, STM32F103VE, STM32F103VF, STM32F103VG,
  • STM32F103ZC, STM32F103ZD, STM32F103ZE, STM32F103ZF, STM32F103ZG,
  • STM32F105R8, STM32F105RB, STM32F105RC, STM32F105V8, STM32F105VB, STM32F105VC,
  • STM32F107RB, STM32F107RC, STM32F107VB, STM32F107VC
  • STM32F401CB, STM32F401CC, STM32F401RB, STM32F401RC, STM32F401VB, STM32F401VC
  • STM32F405OE, STM32F405OG, STM32F405RG, STM32F405VG, STM32F405ZG
  • STM32F407IE, STM32F407IG, STM32F407VE, STM32F407VG, STM32F407ZE, STM32F407ZG,
  • STM32F415OG, STM32F415RG, STM32F415VG, STM32F415ZG
  • STM32F417IE, STM32F417IG, STM32F417VE, STM32F417VG, STM32F417ZE, STM32F417ZG
  • STM32L151C6, STM32L151C8, STM32L151CB, STM32L151R6, STM32L151R8, STM32L151RB, STM32L151V8, STM32L151VB NEW
  • STM32L151CC, STM32L151QC, STM32L151RC, STM32L151UC, STM32L151VC, STM32L151ZC NEW
  • STM32L151QD, STM32L151RD, STM32L151VD, STM32L151ZD NEW
  • STM32L152C6, STM32L152C8, STM32L152CB, STM32L152R6, STM32L152R8, STM32L152RB, STM32L152V8, STM32L152VB NEW
  • STM32L152CC, STM32L152QC, STM32L152RC, STM32L152VC, STM32L152ZC NEW
  • STM32L152QD, STM32L152RD, STM32L152VD, STM32L152ZD NEW
  • STM32F302CB, STM32F302CC, STM32F302RB, STM32F302RC, STM32F302VB, STM32F302VC NEW
  • STM32F303CB, STM32F303CC, STM32F303RB, STM32F303RC, STM32F303VB, STM32F303VC NEW
Plus, this claim is suported by CooCox forum discussions: This and that.

Using CoIDE was important for me, as group I work in uses it... but well, I'll wait for 1.8 or try to use it anyway as you suggested :) I'll share my experience (if only my memory doesn't fail me :P )
« Last Edit: August 07, 2014, 04:44:16 pm by QrackM »
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: STM32F429I (STM32-DISCO) & CoIDE? Getting started...
« Reply #4 on: August 07, 2014, 05:07:26 pm »
You can always compile to the corresponding CMx chip - which CoIDE supports and load up the right start-up file / CMSIS / libraries. This is effectively what CoIDE does for you automatically if the chip is supported.
================================
https://dannyelectronics.wordpress.com/
 

Offline photovore

  • Newbie
  • Posts: 9
  • Country: de
Re: STM32F429I (STM32-DISCO) & CoIDE? Getting started...
« Reply #5 on: August 07, 2014, 08:35:45 pm »
I recently did a project with the STM32F429 in CoIDE. I used the libraries from this page http://mikrocontroller.bplaced.net/wordpress/?page_id=2736 as a starting point. They all run perfectly in CoIDE, just make sure not to use the CoIDE repository if you have to import any new standard peripheral libraries as they are all for the STM32F4. You have to use the libraries for the 429 that you can download on the ST website. The file is named STM32F429I-Discovery_FW_V1.0.1.
« Last Edit: August 07, 2014, 08:38:16 pm by photovore »
 

Offline QrackMTopic starter

  • Contributor
  • Posts: 11
  • Country: pl
  • You can count on me...
Re: STM32F429I (STM32-DISCO) & CoIDE? Getting started...
« Reply #6 on: August 15, 2014, 12:29:29 am »
So, after a bit playing around, board works. For now I tried to use KEIL uVision 5 and CoIDE (which works without any problems...).
Obviously, now I've got tons of libraries and other stuff, so have to clean it up and choose my tools&libs, but that will come with time :P

So now only one thing is obscure to me, as I tested full speed (180MHz) and did
Code: [Select]
for(i=1000; i>0; i--)
{
   for(j=180000; j>0; j--);
}

loop in while(1) after toggling LED I get like ~7s delay. Using SysClockTick works like a charm, so won't bother about it much longer, but I'd like to know what causes this issue and should it be that way? (NOTE: problem appears both in CoIDE and KEIL)- my theory is latency (wait states).

So, for now thanks for your answers, gave me a good start ;)
« Last Edit: August 15, 2014, 12:42:43 am by QrackM »
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: STM32F429I (STM32-DISCO) & CoIDE? Getting started...
« Reply #7 on: August 15, 2014, 01:01:23 am »
Quote
I'd like to know what causes this issue and should it be that way?

Tough to answer without knowing what "this issue" is.
================================
https://dannyelectronics.wordpress.com/
 

Offline AndreasF

  • Frequent Contributor
  • **
  • Posts: 251
  • Country: gb
    • mind-dump.net
Re: STM32F429I (STM32-DISCO) & CoIDE? Getting started...
« Reply #8 on: August 15, 2014, 05:56:56 am »
If you were hoping to get a 1 second interval with those nested loops, think about how many fundamental steps need to happen for each iteration of a loop. Each of those will take one (or more) processor cycles, so your total number cycles will be a lot more than 180000000.
my random ramblings mind-dump.net
 

Offline QrackMTopic starter

  • Contributor
  • Posts: 11
  • Country: pl
  • You can count on me...
Re: STM32F429I (STM32-DISCO) & CoIDE? Getting started...
« Reply #9 on: August 15, 2014, 12:01:45 pm »
@dannyf
'this issue' meaning nested for's giving different delay time then expected. But AndreasF already gave the answer ;)

@AndreasF
Well, expected just asm DJNZ's, but appears I should find output assembly file and check it out ;D Now feel lame that I even asked, thing is so obvious... :palm: but it worked on 8051 so pretty :P

EDIT://
So, debugged, disassembled, now I see it 8)
« Last Edit: August 15, 2014, 12:25:28 pm by QrackM »
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: STM32F429I (STM32-DISCO) & CoIDE? Getting started...
« Reply #10 on: August 15, 2014, 12:32:04 pm »
Quote
'this issue' meaning nested for's giving different delay time then expected.

Then you will need to describe your expectation vs. the actual behavior the code gave.

Quote
now I see it

Software delays like that are actually much harder to code, in that their execution can be highly dependent on optimization settings of the compiler.
================================
https://dannyelectronics.wordpress.com/
 

Offline leppie

  • Frequent Contributor
  • **
  • Posts: 269
  • Country: za
Re: STM32F429I (STM32-DISCO) & CoIDE? Getting started...
« Reply #11 on: August 15, 2014, 01:23:38 pm »
It all depends on optimization levels of the compiler. But as you said, you found SysTick, and that is pretty much the way to go IMO :)  There are some assembly snippets for microsecond (or less) delay (which wont get optimized either way).
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: STM32F429I (STM32-DISCO) & CoIDE? Getting started...
« Reply #12 on: August 15, 2014, 02:05:41 pm »
Systick has the added advantage of providing very fine timing resolution, even if systick itself is on larger intervals.
================================
https://dannyelectronics.wordpress.com/
 

Offline QrackMTopic starter

  • Contributor
  • Posts: 11
  • Country: pl
  • You can count on me...
Re: STM32F429I (STM32-DISCO) & CoIDE? Getting started...
« Reply #13 on: August 15, 2014, 04:48:39 pm »
@leppie
I noticed that it's strongly dependent on optimization. For start it took my for based delay exactly 10 cycles, so when I expected to get 1 ms delay i got 10ms, pretty bang on. That was my main worry, I expected 2, maybe 3 cycles, not 10 :O But after some playing around 180 000 for loop executions took arount 7ms...

@dannyf
There's not much to explain, as just got surprised how many c cycles can empty for take :P

As now I've got SysTick working, I'm going to give I2C a go :box:

Once more, thanks for your help and explanations, jumping from AVR to STM32 with 2 weeks playing around with STM8 is fun  :-+

EDIT://update
So, beware, I'll probably need some advice soon :P
Setting up I2C is not as straigt-forward as expected, first problem I encountered is that start and stop are generated, but nothing in between. after some  :-/O tweaking I get something on SDA, but SCL- zero, null, nada :O I'll link logic signals from Saleae :-BROKE
« Last Edit: August 16, 2014, 05:55:39 pm by QrackM »
 

Offline leppie

  • Frequent Contributor
  • **
  • Posts: 269
  • Country: za
Re: STM32F429I (STM32-DISCO) & CoIDE? Getting started...
« Reply #14 on: August 18, 2014, 01:52:28 pm »
EDIT://update
Setting up I2C is not as straigt-forward as expected, first problem I encountered is that start and stop are generated, but nothing in between. after some  :-/O tweaking I get something on SDA, but SCL- zero, null, nada :O I'll link logic signals from Saleae :-BROKE

I know I2C on STM32Fxx was flaky a few years back, ST usually have a software driver for it in some board packages. Not sure if that is still the case. Check the errata.
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6626
  • Country: nl
Re: STM32F429I (STM32-DISCO) & CoIDE? Getting started...
« Reply #15 on: August 18, 2014, 02:20:52 pm »
Yup: I2C for STM32 use the (CPAL) or (UM1029) library:

see https://www.eevblog.com/forum/microcontrollers/atmel-arm-cortex/msg486593/#msg486593
 

Offline QrackMTopic starter

  • Contributor
  • Posts: 11
  • Country: pl
  • You can count on me...
Re: STM32F429I (STM32-DISCO) & CoIDE? Getting started...
« Reply #16 on: August 18, 2014, 07:52:39 pm »
@Kjelt
There is an issue in F4's still it appears. Errata informs about different problem than I'm currently struggling with. In my case there is no SCL, which gives 'No ACK' and then constantly 'I2C busy', it desn't even generate STOP :scared:
Since we started talking about I2C, I'm linking signal capture:


This happens with sample code I retrieved from internetS :P (ommiting defines and includes...):
Code: [Select]
int main(void)
{
// Init system to get 168MHz clock. PCLK is prescalled by 8, 42MHz
SystemInit();

SysTick_Init();

GPIO_InitTypeDef GPIO_InitStructure;
  I2C_InitTypeDef  I2C_InitStruct;

  RCC_APB1PeriphClockCmd(RCC_APB1Periph_I2C1, ENABLE);
  RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOB, ENABLE);

  GPIO_PinAFConfig(GPIOB, GPIO_PinSource8, GPIO_AF_I2C1); //PB8 -> I2C1_SCL
  GPIO_PinAFConfig(GPIOB, GPIO_PinSource9, GPIO_AF_I2C1); //PB9 -> I2C1_SDA

  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8 | GPIO_Pin_9;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_25MHz; //
  GPIO_InitStructure.GPIO_OType = GPIO_OType_OD;
  GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;
  GPIO_Init(GPIOB, &GPIO_InitStructure);

  I2C_DeInit(I2C1); /* I2C DeInit */

  /* Enable the I2C peripheral */
  I2C_Cmd(I2C1, ENABLE);

  /* Set the I2C structure parameters */
  I2C_InitStruct.I2C_Mode = I2C_Mode_I2C;
  I2C_InitStruct.I2C_DutyCycle = I2C_DutyCycle_2;
  I2C_InitStruct.I2C_OwnAddress1 = 0xFE;  //Master address
  I2C_InitStruct.I2C_Ack = I2C_Ack_Enable;
  I2C_InitStruct.I2C_AcknowledgedAddress = I2C_AcknowledgedAddress_7bit; //7 bit address mode
  I2C_InitStruct.I2C_ClockSpeed = 30000; // speed = 30K

  /* Initialize the I2C peripheral w/ selected parameters */
  I2C_Init(I2C1, &I2C_InitStruct);

    while(1)
    {
    while(I2C_GetFlagStatus(I2C1,I2C_FLAG_BUSY));
    I2C_GenerateSTART(I2C1,ENABLE);

    while(!I2C_CheckEvent(I2C1,I2C_EVENT_MASTER_MODE_SELECT));
    I2C_Send7bitAddress(I2C1, 0xAA, I2C_Direction_Transmitter);     //random address for seeing bits changing on SDA

    // here I have ack failure (sr1) and busy, master (sr2) in SR. SR1 == 1024, SR2 = 3

    I2C_GenerateSTOP(I2C2, ENABLE);
    SysTick_DelayMs(50);
    }
}

Also got to condition when no data was sent, jus START and STOP bits (don't have capture)
« Last Edit: August 18, 2014, 07:59:00 pm by QrackM »
 

Offline AndreasF

  • Frequent Contributor
  • **
  • Posts: 251
  • Country: gb
    • mind-dump.net
Re: STM32F429I (STM32-DISCO) & CoIDE? Getting started...
« Reply #17 on: August 18, 2014, 08:56:31 pm »
if you are sending a ...
Quote
... //random address for seeing bits changing on SDA
..., why are you surprised that you will eventually get an acknowledge failure? If you don't have an I2C slave responding to that address this would be the expected behaviour, no?
my random ramblings mind-dump.net
 

Offline AndreasF

  • Frequent Contributor
  • **
  • Posts: 251
  • Country: gb
    • mind-dump.net
Re: STM32F429I (STM32-DISCO) & CoIDE? Getting started...
« Reply #18 on: August 18, 2014, 09:06:21 pm »
Here's the piece of I2C code I used with no problems on my STM32F407-Discovery board to talk to the onboard audio codec. Works like a charm. My I2C init structure looks virtually identical to yours (I use a higher speed).

Code: [Select]
void send_codec_ctrl(uint8_t controlBytes[], uint8_t numBytes)
{
uint8_t bytesSent=0;

while (I2C_GetFlagStatus(CODEC_I2C, I2C_FLAG_BUSY))
{
//just wait until no longer busy
}

I2C_GenerateSTART(CODEC_I2C, ENABLE);
while (!I2C_GetFlagStatus(CODEC_I2C, I2C_FLAG_SB))
{
//wait for generation of start condition
}
I2C_Send7bitAddress(CODEC_I2C, CODEC_I2C_ADDRESS, I2C_Direction_Transmitter);
while (!I2C_CheckEvent(CODEC_I2C, I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED))
{
//wait for end of address transmission
}
while (bytesSent < numBytes)
{
I2C_SendData(CODEC_I2C, controlBytes[bytesSent]);
bytesSent++;
while (!I2C_CheckEvent(CODEC_I2C, I2C_EVENT_MASTER_BYTE_TRANSMITTING))
{
//wait for transmission of byte
}
}
while(!I2C_GetFlagStatus(CODEC_I2C, I2C_FLAG_BTF))
{
    //wait until it's finished sending before creating STOP
}
I2C_GenerateSTOP(CODEC_I2C, ENABLE);

}
my random ramblings mind-dump.net
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6626
  • Country: nl
Re: STM32F429I (STM32-DISCO) & CoIDE? Getting started...
« Reply #19 on: August 18, 2014, 09:06:57 pm »
Can,t help right now, no access to code.
 Check if you have proper pull up resistors and a slave device attached.
Check the correct initialization of the GPIO pins. Read all docs you can and try to find a verified working example online of the correct initialization and verify with your code.

EDIT see you have alread a helping hand with code  :D
 

Offline QrackMTopic starter

  • Contributor
  • Posts: 11
  • Country: pl
  • You can count on me...
Re: STM32F429I (STM32-DISCO) & CoIDE? Getting started...
« Reply #20 on: August 18, 2014, 09:57:41 pm »
@AndreasF
I don't expect to get ACK. I expect to get clock signal on SCL line, which just goes low and stays this way.  And what I have to get my head around is why I don't get STOP. Didn't read datasheet yet, but engineers feeling would tell me that it should clear ACK failure and release bus...Thanks for the code though, gonna check it tomorrow (now got into other TTD's, and night is coming in Poland)

@Kjelt
As written between lines, I'm currently trying this I2C 'dry', without slave connected. Wouldn't it be same way as selecting wrong address? I mean, ACK wouldn't appear any way, bus should handle that...
What I'm considering is that it need external pull-up's. Again, maybe I hope for too much, but since there's no load on bus, internal pull-up's should do... or not, just got enlightment that when used as Alternative Function they may be disconnected and it's just me hitting brick wall (there's even icon for that:  |O :P ). Would make myself look stupid again, but well.. sometimes you just go blind on basics... :palm:

 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6626
  • Country: nl
Re: STM32F429I (STM32-DISCO) & CoIDE? Getting started...
« Reply #21 on: August 19, 2014, 08:11:41 am »
Qrack have a look here: https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2FI2C%20Configuration%20on%20STM32F2xx&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=1778
more persons with your problem and solution.
Probably a wrong remap of wrong pins icw ic peripheral. Double check everything. Check if
Usual pin config for i2c is gpioMode_Alternate,gpioModeOutputType_OD and gpioPull_Floating with external pullups.
Also check I2C_Send7bitAddress implementation if it is not generating a start condition itself (then you have a conflict starting twice in periph.). Lots of possibilities unfortunately. Suggest to use CPAL library and example of ST to start afresh.
Also the i2c event and error interrupts are they handled or do you use polling.
 

Offline QrackMTopic starter

  • Contributor
  • Posts: 11
  • Country: pl
  • You can count on me...
Re: STM32F429I (STM32-DISCO) & CoIDE? Getting started...
« Reply #22 on: August 19, 2014, 02:26:12 pm »
@Kjelt
Thank's for the link, it's acctually one of many I visited, didn't help me :-//

But, fortunatelly, our discussion did (to some extent :P) ! :-+ As it's course took to pull-ups, I decided to make some art (I'm not at home this week, so I really used some MacGayver skills) and use external 10k's. Now I get SCL O0

Still, I try it without Slave connected, so get ACK failure, but that's expected. Now I just have to figure why I don't get Stop... :scared:

EDIT://
Ok, call me an idiot. Now it was just me, looking for Stop generated on I2C2 on I2C1 interface...

After this thread, I must admitt, I'm really happy to join this forum community. Hope I'll be able to rather-help-than-ask soon :-+
« Last Edit: August 19, 2014, 02:36:07 pm by QrackM »
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6626
  • Country: nl
Re: STM32F429I (STM32-DISCO) & CoIDE? Getting started...
« Reply #23 on: August 19, 2014, 03:02:41 pm »
Now I just have to figure why I don't get Stop...
Did you clear the AF flag in the SR before generating the stop?
for cpal this looks like CPAL_I2C_DEVICE[(device)]->SR1 = ~I2C_SR1_AF
 

Offline leppie

  • Frequent Contributor
  • **
  • Posts: 269
  • Country: za
Re: STM32F429I (STM32-DISCO) & CoIDE? Getting started...
« Reply #24 on: August 19, 2014, 03:24:12 pm »
EDIT://
Ok, call me an idiot. Now it was just me, looking for Stop generated on I2C2 on I2C1 interface...

I was just going to say that! :D
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf