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:08] Radovan Juráň |
2018:si470x-rds [2019/01/28 08:32] (aktuální) Radovan Juráň |
||
|---|---|---|---|
| Řádek 68: | Řádek 68: | ||
| <code c> | <code c> | ||
| + | uint8_t si4703_registers[32] = ""; | ||
| + | //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. */ | ||
| /*2. Supply VIO while keeping the RST pin low. Note that power supplies may be sequenced in any order (steps 1 | /*2. Supply VIO while keeping the RST pin low. Note that power supplies may be sequenced in any order (steps 1 | ||
| Řádek 94: | Řá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> | ||