Zde můžete vidět rozdíly mezi vybranou verzí a aktuální verzí dané stránky.
| Obě strany předchozí revize Předchozí verze Následující verze | Předchozí verze | ||
|
2018:si470x-rds [2019/01/28 08:30] Radovan Juráň [Postup práce] |
2018:si470x-rds [2019/01/28 08:32] (aktuální) Radovan Juráň |
||
|---|---|---|---|
| Řádek 69: | Řádek 69: | ||
| <code c> | <code c> | ||
| uint8_t si4703_registers[32] = ""; | uint8_t si4703_registers[32] = ""; | ||
| - | //zeros at initial state, https://stackoverflow.com/questions/18688971/c-char-array-initialization | + | //force zeros at initial state by default, https://stackoverflow.com/questions/18688971/c-char-array-initialization |
| /* 1. Supply VA and VD. */ | /* 1. Supply VA and VD. */ | ||
| Řádek 97: | Řádek 97: | ||
| device tolerances.*/ | device tolerances.*/ | ||
| HAL_I2C_MspInit(&hi2c3); //wake up the I2C | HAL_I2C_MspInit(&hi2c3); //wake up the I2C | ||
| + | HAL_I2C_Master_Receive(&hi2c3, SI4703_ADDRESS, si4703_registers, 32, 100); //read for being able to modify | ||
| /*6. Si4703-C19 Errata Solution 2: Set RDSD = 0x0000. Note that this is a writable register.*/ | /*6. Si4703-C19 Errata Solution 2: Set RDSD = 0x0000. Note that this is a writable register.*/ | ||
| /*7. Set the ENABLE bit high and the DISABLE bit low to powerup the device.*/ | /*7. Set the ENABLE bit high and the DISABLE bit low to powerup the device.*/ | ||
| - | |||
| - | HAL_I2C_Master_Receive(&hi2c3, SI4703_ADDRESS, si4703_registers, 32, 100); | ||
| </code> | </code> | ||