Skip to content
Snippets Groups Projects
  1. Sep 05, 2023
  2. Aug 23, 2023
    • Clément Foucher's avatar
      Make Data Acquisition module independent from Scheduling. · 781e4221
      Clément Foucher authored
      This is done by moving repetition computation to scheduling.
      User can now indicate that he/she does not want Scheduling to manage data dispatch by adding a parameter to the startUninterruptibleSynchronousTask() function.
      This commit also addresses a bug where interrupt-based dispatch was causing an error.
      781e4221
  3. Aug 17, 2023
  4. Jul 13, 2023
  5. Jul 10, 2023
  6. Jul 05, 2023
    • Ayoub Farah Hassan's avatar
      Adding communication modules : RS485 and synchronization · 6aa097b9
      Ayoub Farah Hassan authored and Clément Foucher's avatar Clément Foucher committed
      # Synchronization 
      
      Using `syncCommunication.initMaster()` starts a board in **master** mode, and send a synchronization pulse every control task period. Using `syncCommunication.initSlave()` starts a board in **slave** mode, and the control task is called only when receiving a synchronization pulse from **master** allowing us to have two synchronized control task working at the same time. 
      
      ## How it works 
      
      The synchronization is a feature from HRTIM (see _RM0440 27.3.19_) which synchronize multiple HRTIM between them. 
      In this commit, in **master** mode, when HRTIM `TIMA` resets the HRTIM is sending a synchronization pulse via `PB1` which means that if TIMA is working at 200Khz it sends a pulse every 5µs. However this is only true if `PB1` is in **alternate** mode. What we are doing is : 
      - `PB1` in output mode which force it to low level.
      - When we enter in the control task, we set `PB1`in **alternate** mode. 
      - Then we wait for about 5µs in order to send a single synchronization pulse before forcing again `PB1` to low level by setting it to **output mode**. 
      
      We are not only synchronizing control task, but also master and slave HRTIM and PWM with this.
        
      
      # RS485
      
      This commit also implement modules for communication with RS485 : 
      
      - DMA 1 channel 6 is used for transferring data buffer to send to USART3 TX, and channel 7 is used for retrieving data buffer from USART RX. 
      - RS485 Driver Enable mode is used (see _RM0440 37.5.20_)
      6aa097b9
  7. Jun 23, 2023
  8. Jun 13, 2023
  9. May 04, 2023
  10. Apr 03, 2023
    • Clément Foucher's avatar
      Hw config reorganization · 094015bf
      Clément Foucher authored
      Reorganize Hardware Configuration module to be fully C++ object-based, instead of using C-style functions that add an unnecessary level of function calls.
      094015bf
    • Clément Foucher's avatar
      ADC driver: · 6fa73b43
      Clément Foucher authored
      - Identify ADCs by their reg addr instead of their label, as this property is going deprecated in Zephyr.
      - Move all low-level calls to adc_core instead of adc_channels.
      - Move adc_channels into Data Acquisition.
      - Add an ADC stop function.
      - ADC driver module self-manages ADC init.
      6fa73b43
    • Thomas Walter's avatar
      [ADD] Update calibration coefficient via serial port · 0463e9ae
      Thomas Walter authored and Clément Foucher's avatar Clément Foucher committed
      Add the functionnality to change the dataAcquisition parameters (gain, offset) via the serial port.
      0463e9ae
  11. Mar 31, 2023
  12. Feb 21, 2023
    • Ayoub Farah Hassan's avatar
      Current mode update · f64c74b2
      Ayoub Farah Hassan authored and Luiz Fernando Lavado Villa's avatar Luiz Fernando Lavado Villa committed
      This commit updates owntech modules to implement the current mode.
      
      ## Update of HRTIM module
      
      - Deleting unnecessary LL function generated by cubeMX, and replacing with clear functions.
      - The adc for leg2 was triggered previously by the timing unit's CMP4, this commit replace it with CMP3 as CMP4 is used for current mode.
      
      ## Update of DAC module 
      
      - Adding more trigger for sawtooth generation.
      - Adding "External and Internal" mode for DAC output mode.
      - Update dac_stm32_function_update_reset and dac_stm32_function_update_step to delete the lines disabling/enabling the DACs.
      
      ## Update of Comparator module
      
      - Comparator 1 is now linked to DAC3 and comparator 3 to DAC1.
      
      ## Update of Hardware Configuration module
      
      - Adding essential functions to set the current mode.
      - Adding comparator_configuration files, adding changes to cmake and Kconfig in hardware configuration to include the comparator drivers.
      f64c74b2
  13. Feb 17, 2023
  14. Feb 16, 2023
    • Clément Foucher's avatar
      Introduced a new way of doing data dispatch: dispatch on uninterruptible task start. · 90f0b2ae
      Clément Foucher authored and Luiz Fernando Lavado Villa's avatar Luiz Fernando Lavado Villa committed
      This introduces a new dependency between Data Acquisition and Scheduling modules, which now depend from each other.
      To use this new behavior, just remove call to dataAcquisition.start(), start will be done automatically.
      
      Also:
      - Introduced a new dataValid paramteter for get*() functions to provide information about obtained data.
      - Corrected an error when starting uninterruptible task with default parameters without having started HRTIM first.
      - Moved Data Acquisition internal files from C to C++ to harmonize language within a single module.
      90f0b2ae
  15. Feb 08, 2023
    • Clément Foucher's avatar
      HRTIM module : · 1e043463
      Clément Foucher authored
      - Add a function to obtain current repetition value.
      - Separate Periodic Event enable from its configuration, that will be required in future changes.
      1e043463
    • Clément Foucher's avatar
      Reorganize zephyr folder: put dts files in their correct place according to Zephyr documentation. · c1bba598
      Clément Foucher authored
      Add an overlay file for Nucleo G474RE because it wasn't possible to use that board any more.
      Removed unnecessary compiler option from platformio.ini.
      c1bba598
    • Clément Foucher's avatar
      Small improvements to Data Acquisition, Scheduling and GPIO modules. · fa833c73
      Clément Foucher authored
      Data Acquisition module:
      - Get rid of static qualifiers that add complexity to code and are useless if user use the module correctly (i.e. does not instantiate its own object).
      - Add guards to prevent accessing module functions when it is not started.
      - Rewrite functions comments to ease API understanding.
      - Corrected voltage offsets that were invalidated by conversion formula change.
      
      Scheduling module:
      - Add an initial value of "uninitialized" for interrupt source.
      - Use typedef enum instead of enum class: prefix not mandatory any more.
      
      GPIO module:
      - Just add small comments to public include file to better understand file sections.
      fa833c73
  16. Jan 31, 2023
    • Clément Foucher's avatar
      Introduced a configuration for uninterruptible task source event. · 8b83764d
      Clément Foucher authored
      Now, by default, HRTIM will be the source of the uninterruptible task trigger.
      However, as this require HRTIM to be initialized, Timer 6 is kept as an option for uses that do not involve HRTIM.
      
      Also:
      - Introduced a function to obtain HRTIM period in µs, and corrected a misleading comment on the existing function.
      8b83764d
  17. Jan 25, 2023
  18. Jan 20, 2023
  19. Jan 18, 2023
  20. Jan 12, 2023
  21. Dec 13, 2022
  22. Nov 23, 2022
  23. Nov 22, 2022
  24. Nov 03, 2022
  25. Nov 02, 2022
    • Clément Foucher's avatar
      Update method to acquire Zephyr device structures · 7c36237c
      Clément Foucher authored
      This MR updates the code used to acquire Zephyr device structures, in order to get rid of the `device_get_binding()` calls.
      
      This allows to ensure statically (at compile time) that the drivers used by the code are correctly referenced wrt. drivers names in device tree, and to prevent code from using devices that are not enabled in device tree.
      7c36237c
  26. Oct 31, 2022
  27. Oct 06, 2022
    • Luiz Fernando Lavado Villa's avatar
      Patch to control the min-max duty cycle and the frequency of the Hrtim · f1e6ddf4
      Luiz Fernando Lavado Villa authored
      It is necessary to properly control the min and max duty cycle of the hrtim. Our code already does that, but it is not efficient neither does it give the possibility for the user to dynamically set other min/max values. This patch solves that.
      
      It is also necessary to give the user the possibility of setting the frequency of the HRTIM. This patch solves that at the leg driver level and provides the user with an access point.
      
      Both the frequency and the min/max duty cycles are set by default at 200kHz and 0.1/0.9 respectively.
      f1e6ddf4
  28. Oct 04, 2022
  29. Sep 29, 2022
Loading