Hi, i write i2c address scanner, stm32f303 disco stuck in loop. Maby wait for TC Transfer Complete flag, no way out anyway.?
Loop from .lst file
L__I2Cx_Write77:
L__I2Cx_Write46:
; i start address is: 8 (R2)
; I2C_BASE start address is: 4 (R1)
; ptr start address is: 12 (R3)
; count start address is: 0 (R0)
; count end address is: 0 (R0)
; ptrdata start address is: 28 (R7)
; ptrdata end address is: 28 (R7)
; I2C_BASE start address is: 4 (R1)
; I2C_BASE end address is: 4 (R1)
; i start address is: 8 (R2)
; i end address is: 8 (R2)
0x0358 0x681D LDR R5, [R3, #0]
0x035A 0xF3C50440 UBFX R4, R5, #1, #1
0x035E 0x2C00 CMP R4, #0
0x0360 0xD0FA BEQ L__I2Cx_Write77
Problem with i2c
Re: Problem with i2c
Hi,
Can you please provide more details about your issue, like hardware setup and software example ?
Regards,
Filip.
Can you please provide more details about your issue, like hardware setup and software example ?
Regards,
Filip.
Re: Problem with i2c
This is example, trying to break loop with NACK interrupt, but program returns again in loop, even when restarting i2c with PE bit.
- Attachments
-
- scani2c.rar
- (103.74 KiB) Downloaded 101 times
Re: Problem with i2c
Hi,
I'm not able to open the RAR file, could you check it please ?
Regards,
Filip.
I'm not able to open the RAR file, could you check it please ?
Regards,
Filip.
Re: Problem with i2c
- Attachments
-
- scani2c.zip
- (697.68 KiB) Downloaded 101 times
Re: Problem with i2c
Hi Filip. Do you check the file's?
- petar.suknjaja
- mikroElektronika team
- Posts: 683
- Joined: 05 Mar 2018 09:44
- Location: Belgrade
Re: Problem with i2c
Hi,
I've tried the simple EEPROM example from the compiler, which uses the Hardware I2C library, on the EasyMX PRO V7 for STM32 and it runs without problems.
I would suggest you to try a different approach in creating the I2C scanner, using the integrated routines such as I2Cn_Is_Idle.
Consult the Help Section regarding the I2C.
Kind regards,
Petar
I've tried the simple EEPROM example from the compiler, which uses the Hardware I2C library, on the EasyMX PRO V7 for STM32 and it runs without problems.
I would suggest you to try a different approach in creating the I2C scanner, using the integrated routines such as I2Cn_Is_Idle.
Consult the Help Section regarding the I2C.
Kind regards,
Petar