« Reply #356 on: December 13, 2017, 14:02:55 »
Please note: This is a big update with many big changes in the backend code. It improves three important things:- Fix RS485 Timing bug. This is a very old bug that we were not able to figure out for many years. Bricklets that use I2C (for example Temperature Bricklet) would somtimes give false values every few 1000 messages if RS485 was used. This was caused by a mix of I2C/RS485 timing constraints. We now use DMA for I2C Messages to fix this.
- The handling of the initial enumeration (the enumerate callback with enumeration type = CONNECTED) has been completely reworked. Double enumerations don't happen anymore and the enumeration also works if a USB cable is connected to an already powered stack. This also fixes some other strange behavior. For example: In a RS485 network, if you restarted the RS485 master stack you had to restart the slave stacks as well, otherwise they wouldn't enumerate again. With the update the RS485 slaves will automatically re-enumerate if the RS485 master re-enumerates itself.
- We will now never do a real hard reset if triggered by USB. USB has reset/suspend/resume messages that triggered a hardware reset. With the new firmwares the USB state machine will be properly reset (as requested by the PC), but everything else will keep on running. So the Bricks/Bricklets will not loose state and for example a stepper motor will keep running until the request is fully processed. From the PC perspective the Brick will disconnect and immediately connect again. A new initial enumeration will be send. If you have problems with unwanted resets (for example if a relay switches an inductive load) this will probably fix this issue! The PC will still reset the USB, but from the user perspective everything will keep running and working, no lost messages or similar.
Firmwares: DC Brick 2.3.5, IMU Brick 2.3.5, IMU 2.0 Brick 2.0.10, Master Brick 2.4.6, Servo Brick 2.3.5, Silent Stepper Brick 2.0.4, Stepper Brick 2.3.6- Make sure Brick does not restart on suspend/resume anymore [all]
- Refactor initial enumeration handling for USB/SPI [all] and RS485/Chibi [only Master Brick]
- Fix double-enumeration bug [all]
- Improve co-mcu Bricklet reset handling [all]
- Improve I2C communication (Use DMA in synchronous case) [all]
- Improve RS485 state machine (Use hardware timer instead of busy waiting) [only Master Brick]
Download:
DC Brick,
IMU Brick,
IMU 2.0 Brick,
Master Brick,
Servo Brick,
Silent Stepper Brick,
Stepper BrickPlugins: Temperature Bricklet 2.0.4- Use bricklib for I2C communication (enables DMA for I2C, see above)
Download:
Temperature Bricklet

Logged
Wir sind die Borg, Widerstand ist Spannung durch Stromstärke!