Author Topic: STM32F4 I2C Slave TRANSMITTER  (Read 3243 times)

0 Members and 1 Guest are viewing this topic.

Offline richardmanTopic starter

  • Frequent Contributor
  • **
  • Posts: 427
  • Country: us
STM32F4 I2C Slave TRANSMITTER
« on: April 29, 2016, 06:33:34 am »
OK, I just added I2C asynchronous master read/write and slave read to the STM32F4 JumpStart API. It's fun to hook up 2 ST-Nucleos on two different computers and have them communicating. Why 2 separate computers? It's not really possible to support 2 ST-LINK/V2 from the loader, and it's far easier to use 2 computers than making the loader code work :-)

Anyway, I am stumped with slave (asynchronous) transmitter. Indeed, I am not too clear how the TXE interrupt gets generated, is it because of the I2C Start condition with the "address | 1" from the master that triggers the slave ST to say "hey, now I better starting generating interrupts on TXE"?

(Yes, I know about AF on GPIO, NVIC interrupt etc. all those are working for master async/sync read/write and slave async read)

Thanks
// richard http://imagecraft.com/
JumpStart C++ for Cortex (compiler/IDE/debugger): the fastest easiest way to get productive on Cortex-M.
Smart.IO: phone App for embedded systems with no app or wireless coding
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6736
  • Country: nl
Re: STM32F4 I2C Slave TRANSMITTER
« Reply #1 on: April 29, 2016, 09:45:14 am »
In the ref. manual it says:
Quote
When the acknowledge pulse is received:
• The TxE bit is set by hardware with an interrupt if the ITEVFEN and the ITBUFEN bits
are set.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->