Modifications

Sauter à la navigation Sauter à la recherche
99 octets supprimés ,  21 septembre 2018 à 21:36
Ligne 120 : Ligne 120 :  
On a M0 microcontroler, you will have to <font color="red">'''double click'''</font> the '''reset''' button. You will see the LED pulsing on red meaning that the bootloader is active. Once in this mode, the M0 would stay in the bootloader mode forever (there is no "time out"). Click once again on the "reset" button to restart the microcontroler.
 
On a M0 microcontroler, you will have to <font color="red">'''double click'''</font> the '''reset''' button. You will see the LED pulsing on red meaning that the bootloader is active. Once in this mode, the M0 would stay in the bootloader mode forever (there is no "time out"). Click once again on the "reset" button to restart the microcontroler.
   −
== Alignement en mémoire ==
+
== Memory alignment ==
Cela à moi de chance de vous arriver... mais autant être tenu informé.
+
There is few change that you reach this issue... but being aware of this may help.
   −
Si vous avez utilisé des plateformes 8 bits alors vous savez probablement qu'il est possible de réaliser des typecast de variables. Par exemple:
+
If you are using the 8 bits plateform then you probably know that TypeCast can be performed on on variables. Example:
    
<syntaxhighlight lang="c">
 
<syntaxhighlight lang="c">
Ligne 130 : Ligne 130 :  
</syntaxhighlight>
 
</syntaxhighlight>
   −
Mais vous ne pouvez pas garantir que cela fonctionnera sur une plateforme 32 bits parce que '''mybuffer''' pourrait ne pas être aligné sur 2 ou 4 octets (voir [https://fr.wikipedia.org/wiki/Alignement_en_m%C3%A9moire alignement en mémoire] sur Wikipedia).  
+
But there is no warranty that this may work properly on 32 bits AVR because '''mybuffer''' may not been aligned on 2 or 4 bytes (voir [https://en.wikipedia.org/wiki/Data_structure_alignment memory alignment] on Wikipedia).  
   −
Un ARM Cortex-M0 peut uniquement accéder directement aux données par bloc de 16-bit (tous les deux ou 4 octets). Essayer d'accéder à un octet impaire (octets en position 1 ou 3) provoquera une erreur matérielle et un arrêt du MCU.  
+
An ARM Cortex-M0 can only directly access to data by bloc of 16-bits (every 2 or 4 bytes). Trying to access an even byte (byte in position 1 or 3) would cause an hardware fault and will stop a MCU.  
   −
Heureusement, il existe une solution simple... utiliser la fonction {{fname|memcpy}} !
+
Thankfully, there is a very simple workaround... by using the {{fname|memcpy}} function!
    
<syntaxhighlight lang="c">
 
<syntaxhighlight lang="c">
29 836

modifications

Menu de navigation