- Jun 13, 2023
-
-
Clément Foucher authored
- Data acquisition will now provide default accessors based on pin number, and additional accessors for Twist based on channel name. - NGND module will only be enabled on Twist.
-
- May 04, 2023
-
-
Fix ADC triggers from HRTIM.
-
Clément Foucher authored
Under Windows, it appeared that modules list was not always in the same order, causing full recompilation event when code wasn't modified.
-
- Apr 03, 2023
-
-
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.
-
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.
-
Add the functionnality to change the dataAcquisition parameters (gain, offset) via the serial port.
-
- Mar 31, 2023
-
-
I modified the function _hrtim_init_events_center_aligned in the hrtim_common.c so the triggering of the ADC is not on PER but on a comparator. ADC of leg 1 is now triggered by CMP3 (on TIMA) and leg 2 is triggered by CMP4 (on TIMC). Note : with this update, CMP3 and CMP4 are now unavailable.
-
- Feb 21, 2023
-
-
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.
-
- Feb 17, 2023
-
-
Clément Foucher authored
Rewrite comments for better functions descriptions. However, it looks like VS Code's Intellisense does not support comment groups for tooltips...
-
- Feb 16, 2023
-
-
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.
-
- Feb 08, 2023
-
-
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.
-
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.
-
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.
-
- Jan 31, 2023
-
-
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.
-
- Jan 25, 2023
-
-
Clément Foucher authored
Also: - Improved constants declarations in GPIO API header, - Corrected an unused variable defined in HRTIM driver.
-
Clément Foucher authored
This is a preliminary change to data acquisition intended at adapting its structure for future changes.
-
- Jan 20, 2023
-
-
data_conversion_convert_v1_low and data_conversion_convert_v2_low add offset instead of substracting it.
-
- Jan 18, 2023
-
-
Clément Foucher authored
- Repetition parameter equal to the number of periods of the HRTIM: the user doesn't have to do the math related to underlying HW specificity. - No more default value for repetition when enabling Periodic Event: the user must explicitly set a value depending on its use case. - Prefer timer unit reference to always be first parameter for functions consistency. - Update copyright years are we are now in 2023.
-
This commit add three functions to implement interrupt on HRTIM repetition counter event.
-
- Jan 12, 2023
-
-
Clément Foucher authored
-
- Dec 13, 2022
-
-
Luiz Fernando Lavado Villa authored
The ADC must be triggered by the HRTIM to make a conversion. ADC1 converts the data from leg 1 and ADC2 converts data from leg 2. ADC1 uses event 1 to trigger and ADC2 uses event 3. This patch links event 1 to HRTIMA (leg1) and event 3 to HRTIM C (leg 2). This connection was previously inverted.
-
Luiz Fernando Lavado Villa authored
This commit replaces the pincontrol call from stm32 with a LL based configuration. This is necessary as the call became deprecated in the newest version of platformio Zephyr.
-
- Nov 23, 2022
-
-
Luiz Fernando Lavado Villa authored
To use other ADCs on the board, it is necessary to add them to the DTS. This commit is dedicate to DTS improvements. A new adc-channel was added "ANALOG_COMM". ADC4 was added at the adc.dtsi The PB15 pin was added to the pin control. It corresponds to the 5th channel of ADC4. The ADC4 was also added to the owntech_board.dts, where it is activated and its channel declared.
-
Clément Foucher authored
-
- Nov 22, 2022
-
-
Clément Foucher authored
No more default naming for these tasks, user is in charge of creating its own tasks. Also renamed "Control task" to "Uninterruptible synchronous task".
-
- Nov 03, 2022
-
-
Clément Foucher authored
-
One of the four communication methods uses a DAC for analog signal sharing. This commit implements a first non-tested version of this feature. Four files were modified to implement this feature: - The low layer dac_configuration.h and .cpp: These files allow access to the dac module and can set any dac to constant value mode. The constant value can also be set. - The HardwareConfiguration API: They give access to the low-leve configuration file to the user.
-
- Nov 02, 2022
-
-
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.
-
- Oct 31, 2022
-
-
Luiz Fernando Lavado Villa authored
There was an error on the code for the inversion of the legs for two modes: independent and inverter. This patch corrects this issue. The inverter mode had a problem on the `hrtim_configuration.c` file, the second leg was inverter and not the first. The independent mode had a problem on the `HardwareConfiguration.cpp` file, the sencond leg was inverter and not the first.
-
- Oct 06, 2022
-
-
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.
-
- Oct 04, 2022
-
-
Luiz Fernando Lavado Villa authored
Updates the hardware configuration to allow using the gpio api to drive the power drivers for high side mosfets. On the gpio side, the user now seamlessly activates the high side when activating the legs. On the adc side, the user can now set the point of measurement with a float from the main.cpp for better control of the measurement moment.
-
- Sep 29, 2022
-
-
Clément Foucher authored
-
Clément Foucher authored
-
Luiz Fernando Lavado Villa authored
This commit is a patch to address the issue of the Twist v1.1.2 board whose HRTIMA signals have been inverter in routing. This commit defines a new hardware version, the TWIST_V_1_1_2. This hardware version is then used to set up the control initialization sequence of the power legs, applying the necessary changest to leg 1 whose timer signals have been reversed in routing. There is also a correction on the hrtim_init_independent_mode functino that initializes the pwm_phase_shift variable as well as their leg dependent equivalents. This initalization is necessary to use the hrtim_interleaved_pwm_update function which uses the phase_shift variable when updating the duty cycle of interleaved buck and boost applicaitons.
-
- Sep 28, 2022
-
-
Luiz Fernando Lavado Villa authored
This merge request corrects a small glitch on the trigger for the ADC for the O2 board. This was changed some time ago. It did not work when tested in practice.
-
- Sep 27, 2022
-
-
Jean Alinei authored
-
- Sep 26, 2022
-
-
Luiz Fernando Lavado Villa authored
- The ADC 2 event necessary to trigger conversion was wrongly set for the spin board and measurements were not working. - The gain and offset functions for V2 and i2 were not writing at the correct place on the gain table
-
- Sep 19, 2022
-
-
The old version of the SPIN board required inverting the RX/TX of the serial port. The new version does not need this inversion. This commit corrects a bug on the board version and allows choosing the correct SPIN version.
-
Provide a new communication API that rely on Thingset over CAN. As the module relies on a third-party module that has to be downloaded, it is not enable by default.
-
- Jul 29, 2022
-
-
Luiz Fernando Lavado Villa authored
-