- Sep 05, 2023
-
-
Clément Foucher authored
This MR adds the ability to use Spin pin number instead of Nucleo-style naming in GPIO API.
-
- Aug 23, 2023
-
-
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.
-
- Aug 17, 2023
-
-
The default calibration coefficients will now be equal to their default theoretical values.
-
- Jul 13, 2023
-
-
This merge request addresses the issue #56
-
- Jul 10, 2023
-
-
Clément Foucher authored
Get rid of now unused function.
-
- Jul 05, 2023
-
-
# 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_)
-
- Jun 23, 2023
-
-
Fix ADC Trigger by using TIMCMP and CMP4 for ADC Update. Fix get_leg_period_us for center aligned mode.
-
- 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
-