Compare commits

..

13 Commits

Author SHA1 Message Date
facd40cc9d contains hardfault 2025-05-27 22:53:46 +02:00
5253648cfb add 2nd motor 2025-05-15 01:13:10 +02:00
29611f6d43 fix div by 0 bug 2025-05-12 02:23:20 +02:00
9852548a10 wip on stepper movement
some bug occurs on reversiong direction when declining in position
2025-05-03 01:52:29 +02:00
05a9fafee4 Merge pull request 'dma' (#1) from dma into master
Reviewed-on: #1
2025-05-02 00:07:23 +00:00
97c86af4b7 step motor turns, minimal example 2025-05-02 02:00:51 +02:00
096c40d216 bump freqency to 64MHz (max)
had problems in cubeMX with that, but now it seems to work
2025-05-02 01:56:18 +02:00
Stefan Schmidt
0ecf383e3b add first doc files 2025-04-29 18:23:28 +02:00
b85c8fc5f0 dma works 2025-04-28 23:42:51 +02:00
19a85baf33 fix timestamps 2025-04-28 21:45:42 +02:00
8f576045ed add systemview for debugging purposes 2025-04-28 20:40:04 +02:00
e7c793c88e wip on dma config 2025-04-26 16:39:50 +02:00
9aa8651f59 add rtt as submodule 2025-04-26 03:07:24 +02:00
14 changed files with 680 additions and 98 deletions

6
.gitmodules vendored Normal file
View File

@@ -0,0 +1,6 @@
[submodule "Drivers/RTT"]
path = Drivers/RTT
url = https://github.com/SEGGERMicro/RTT.git
[submodule "Drivers/SystemView"]
path = Drivers/SystemView
url = https://github.com/SEGGERMicro/SystemView.git

1
Drivers/SystemView Submodule

Submodule Drivers/SystemView added at d8bbf3f6e7

24
Inc/stepper.h Normal file
View File

@@ -0,0 +1,24 @@
#include "stm32g0b1xx.h"
typedef struct {
GPIO_TypeDef* en_port;
uint8_t en_pin;
GPIO_TypeDef* dir_port;
uint8_t dir_pin;
GPIO_TypeDef* step_port;
uint8_t step_pin;
GPIO_TypeDef* home_port;
uint8_t home_pin;
uint8_t homed:1;
uint8_t trigger_step:1;
int16_t pos;
int32_t speed;
int32_t ramp_to_speed;
uint32_t next_step;
} stepper_T;
#define STEPPER_SPEED_LIMIT 300
void Timer1_Init(void);
void stepper_gpio_init();
void do_steps();

9
Inc/uart_dmx.h Normal file
View File

@@ -0,0 +1,9 @@
#include "stm32g0b1xx.h"
#define BUFFER_SIZE 515
extern uint8_t rxBuffer[BUFFER_SIZE];
extern uint16_t rxBufferPos;
void init_UART1_it();
void init_UART1_dma();

View File

@@ -1,5 +1,5 @@
########################################################################################################################## ##########################################################################################################################
# File automatically-generated by tool: [projectgenerator] version: [4.2.0-B44] date: [Fri Apr 25 22:56:53 CEST 2025] # File automatically-generated by tool: [projectgenerator] version: [4.2.0-B44] date: [Thu May 01 21:37:30 CEST 2025]
########################################################################################################################## ##########################################################################################################################
# ------------------------------------------------ # ------------------------------------------------
@@ -22,7 +22,7 @@ TARGET = Parafraktor
# debug build? # debug build?
DEBUG = 1 DEBUG = 1
# optimization # optimization
OPT = -Og OPT = -O0
####################################### #######################################
@@ -37,6 +37,8 @@ BUILD_DIR = build
# C sources # C sources
C_SOURCES = \ C_SOURCES = \
Src/main.c \ Src/main.c \
Src/uart_dmx.c \
Src/stepper.c \
Src/stm32g0xx_it.c \ Src/stm32g0xx_it.c \
Src/stm32g0xx_hal_msp.c \ Src/stm32g0xx_hal_msp.c \
Drivers/STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_tim.c \ Drivers/STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_tim.c \
@@ -58,6 +60,8 @@ Drivers/STM32G0xx_HAL_Driver/Src/stm32g0xx_hal_exti.c \
Drivers/RTT/RTT/SEGGER_RTT.c \ Drivers/RTT/RTT/SEGGER_RTT.c \
Drivers/RTT/RTT/SEGGER_RTT_printf.c \ Drivers/RTT/RTT/SEGGER_RTT_printf.c \
Drivers/RTT/Syscalls/SEGGER_RTT_Syscalls_GCC.c \ Drivers/RTT/Syscalls/SEGGER_RTT_Syscalls_GCC.c \
Drivers/SystemView/SYSVIEW/SEGGER_SYSVIEW.c \
Drivers/SystemView/Sample/NoOS/Config/Cortex-M0/SEGGER_SYSVIEW_Config_NoOS_CM0.c \
Src/system_stm32g0xx.c Src/system_stm32g0xx.c
# ASM sources # ASM sources
@@ -124,7 +128,10 @@ C_INCLUDES = \
-IDrivers/CMSIS/Device/ST/STM32G0xx/Include \ -IDrivers/CMSIS/Device/ST/STM32G0xx/Include \
-IDrivers/CMSIS/Include \ -IDrivers/CMSIS/Include \
-IDrivers/RTT/Config \ -IDrivers/RTT/Config \
-IDrivers/RTT/RTT -IDrivers/RTT/RTT \
-IDrivers/SystemView/Config \
-IDrivers/SystemView/SEGGER \
-IDrivers/SystemView/SYSVIEW
# compile gcc flags # compile gcc flags

View File

@@ -65,49 +65,50 @@ ProjectManager.UAScriptAfterPath=
ProjectManager.UAScriptBeforePath= ProjectManager.UAScriptBeforePath=
ProjectManager.UnderRoot=false ProjectManager.UnderRoot=false
ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_USART1_UART_Init-USART1-false-HAL-true ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_USART1_UART_Init-USART1-false-HAL-true
RCC.ADCFreq_Value=32000000 RCC.ADCFreq_Value=64000000
RCC.AHBFreq_Value=32000000 RCC.AHBFreq_Value=64000000
RCC.APBFreq_Value=32000000 RCC.APBFreq_Value=64000000
RCC.APBTimFreq_Value=32000000 RCC.APBTimFreq_Value=64000000
RCC.CECFreq_Value=32786.88524590164 RCC.CECFreq_Value=32786.88524590164
RCC.CortexFreq_Value=32000000 RCC.CortexFreq_Value=64000000
RCC.EXTERNAL_CLOCK_VALUE=48000 RCC.EXTERNAL_CLOCK_VALUE=48000
RCC.FCLKCortexFreq_Value=32000000 RCC.FCLKCortexFreq_Value=64000000
RCC.FDCANFreq_Value=32000000 RCC.FDCANFreq_Value=64000000
RCC.FamilyName=M RCC.FamilyName=M
RCC.HCLKFreq_Value=32000000 RCC.HCLKFreq_Value=64000000
RCC.HSE_VALUE=8000000 RCC.HSE_VALUE=8000000
RCC.HSI48_VALUE=48000000 RCC.HSI48_VALUE=48000000
RCC.HSI_VALUE=16000000 RCC.HSI_VALUE=16000000
RCC.I2C1Freq_Value=32000000 RCC.I2C1Freq_Value=64000000
RCC.I2C2Freq_Value=32000000 RCC.I2C2Freq_Value=64000000
RCC.I2S1Freq_Value=32000000 RCC.I2S1Freq_Value=64000000
RCC.I2S2Freq_Value=32000000 RCC.I2S2Freq_Value=64000000
RCC.IPParameters=ADCFreq_Value,AHBFreq_Value,APBFreq_Value,APBTimFreq_Value,CECFreq_Value,CortexFreq_Value,EXTERNAL_CLOCK_VALUE,FCLKCortexFreq_Value,FDCANFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI48_VALUE,HSI_VALUE,I2C1Freq_Value,I2C2Freq_Value,I2S1Freq_Value,I2S2Freq_Value,LPTIM1Freq_Value,LPTIM2Freq_Value,LPUART1Freq_Value,LPUART2Freq_Value,LSCOPinFreq_Value,LSE_VALUE,LSI_VALUE,MCO1PinFreq_Value,MCO2PinFreq_Value,PLLPoutputFreq_Value,PLLQoutputFreq_Value,PLLRCLKFreq_Value,PLLSourceVirtual,PWRFreq_Value,SYSCLKFreq_VALUE,SYSCLKSource,TIM15Freq_Value,TIM1Freq_Value,USART1Freq_Value,USART2Freq_Value,USART3Freq_Value,USBFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value RCC.IPParameters=ADCFreq_Value,AHBFreq_Value,APBFreq_Value,APBTimFreq_Value,CECFreq_Value,CortexFreq_Value,EXTERNAL_CLOCK_VALUE,FCLKCortexFreq_Value,FDCANFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI48_VALUE,HSI_VALUE,I2C1Freq_Value,I2C2Freq_Value,I2S1Freq_Value,I2S2Freq_Value,LPTIM1Freq_Value,LPTIM2Freq_Value,LPUART1Freq_Value,LPUART2Freq_Value,LSCOPinFreq_Value,LSE_VALUE,LSI_VALUE,MCO1PinFreq_Value,MCO2PinFreq_Value,PLLN,PLLPoutputFreq_Value,PLLQoutputFreq_Value,PLLRCLKFreq_Value,PLLSourceVirtual,PWRFreq_Value,SYSCLKFreq_VALUE,SYSCLKSource,TIM15Freq_Value,TIM1Freq_Value,USART1Freq_Value,USART2Freq_Value,USART3Freq_Value,USBFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value
RCC.LPTIM1Freq_Value=32000000 RCC.LPTIM1Freq_Value=64000000
RCC.LPTIM2Freq_Value=32000000 RCC.LPTIM2Freq_Value=64000000
RCC.LPUART1Freq_Value=32000000 RCC.LPUART1Freq_Value=64000000
RCC.LPUART2Freq_Value=32000000 RCC.LPUART2Freq_Value=64000000
RCC.LSCOPinFreq_Value=32000 RCC.LSCOPinFreq_Value=32000
RCC.LSE_VALUE=32768 RCC.LSE_VALUE=32768
RCC.LSI_VALUE=32000 RCC.LSI_VALUE=32000
RCC.MCO1PinFreq_Value=32000000 RCC.MCO1PinFreq_Value=64000000
RCC.MCO2PinFreq_Value=32000000 RCC.MCO2PinFreq_Value=64000000
RCC.PLLPoutputFreq_Value=32000000 RCC.PLLN=16
RCC.PLLQoutputFreq_Value=32000000 RCC.PLLPoutputFreq_Value=64000000
RCC.PLLRCLKFreq_Value=32000000 RCC.PLLQoutputFreq_Value=64000000
RCC.PLLRCLKFreq_Value=64000000
RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSE RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSE
RCC.PWRFreq_Value=32000000 RCC.PWRFreq_Value=64000000
RCC.SYSCLKFreq_VALUE=32000000 RCC.SYSCLKFreq_VALUE=64000000
RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK
RCC.TIM15Freq_Value=32000000 RCC.TIM15Freq_Value=64000000
RCC.TIM1Freq_Value=32000000 RCC.TIM1Freq_Value=64000000
RCC.USART1Freq_Value=32000000 RCC.USART1Freq_Value=64000000
RCC.USART2Freq_Value=32000000 RCC.USART2Freq_Value=64000000
RCC.USART3Freq_Value=32000000 RCC.USART3Freq_Value=64000000
RCC.USBFreq_Value=48000000 RCC.USBFreq_Value=48000000
RCC.VCOInputFreq_Value=8000000 RCC.VCOInputFreq_Value=8000000
RCC.VCOOutputFreq_Value=64000000 RCC.VCOOutputFreq_Value=128000000
VP_SYS_VS_DBSignals.Mode=DisableDeadBatterySignals VP_SYS_VS_DBSignals.Mode=DisableDeadBatterySignals
VP_SYS_VS_DBSignals.Signal=SYS_VS_DBSignals VP_SYS_VS_DBSignals.Signal=SYS_VS_DBSignals
VP_SYS_VS_Systick.Mode=SysTick VP_SYS_VS_Systick.Mode=SysTick

25
README.md Normal file
View File

@@ -0,0 +1,25 @@
# Parrafraktor
![schematic](docs/schematic.png)
| Channel | Function | Values | |
| ------- | ------------ | --------- | ------------------------------ |
| 1 + i | Tilt | | |
| 2 + i | Tilt fine | | |
| 3 + i | Endless Tilt | 000 - 005 | No function |
| | | 006 - 126 | Forward Rotation fast -> slow |
| | | 127 - 128 | Stop |
| | | 129 - 255 | Backward Rotation slow -> fast |
| 36 | Auto Mode | 000 - 004 | No function |
| | | 005 - 010 | Go to Reference |
| | | 015 - 020 | Classic Mode |
## Hardware
- BIGTREETECH Manta M8P
- https://github.com/bigtreetech/Manta-M8P/tree/master/V1.0_V1.1/Hardware
- https://github.com/bigtreetech/Manta-M8P
- https://bttwiki.com/M8P.html#product-profile

View File

@@ -21,11 +21,15 @@
/* Private includes ----------------------------------------------------------*/ /* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */ /* USER CODE BEGIN Includes */
#include "SEGGER_SYSVIEW.h"
#include "SEGGER_RTT.h" #include "SEGGER_RTT.h"
#include "stm32g0b1xx.h" #include "stm32g0b1xx.h"
#include "stm32g0xx_hal_cortex.h" #include "stm32g0xx_hal_cortex.h"
#include <stdint.h> #include <stdint.h>
#include <stdio.h> #include <stdio.h>
#include "uart_dmx.h"
#include "stepper.h"
/* USER CODE END Includes */ /* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/ /* Private typedef -----------------------------------------------------------*/
@@ -58,64 +62,9 @@ static void MX_GPIO_Init(void);
/* Private user code ---------------------------------------------------------*/ /* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */ /* USER CODE BEGIN 0 */
#define BUFFER_SIZE 515
uint8_t rxBuffer[BUFFER_SIZE];
uint16_t rxBufferPos = 0;
void init_UART1(){
RCC->APBENR2 |= RCC_APBENR2_USART1EN;
RCC->IOPENR |= RCC_IOPENR_GPIOCEN;
GPIOC->MODER &= ~GPIO_MODER_MODE5; // Alternate function mode on RX pin
GPIOC->MODER |= GPIO_MODER_MODE5_1;
GPIOC->AFR[0] &= GPIO_AFRL_AFSEL5;
GPIOC->AFR[0] |= 1 << GPIO_AFRL_AFSEL5_Pos;
USART1->BRR = 128; // 32000000÷250000
USART1->CR1 = USART_CR1_RE;
USART1->CR3 |= USART_CR3_EIE;
USART1->CR1 |= USART_CR1_RXNEIE_RXFNEIE;
USART1->CR1 |= USART_CR1_UE;
HAL_NVIC_SetPriority(USART1_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(USART1_IRQn);
}
/* USER CODE END 0 */ /* USER CODE END 0 */
void USART1_IRQHandler(){
if(USART1->ISR & USART_ISR_RXNE_RXFNE){
//printf("%x ", USART1->RDR);
rxBuffer[rxBufferPos++] = USART1->RDR;
if(rxBufferPos >= BUFFER_SIZE){
rxBufferPos = 0;
}
}
if(USART1->ISR & USART_ISR_FE){
USART1->ICR = USART_ICR_FECF;
printf("FE after %d\n",rxBufferPos);
rxBufferPos = 0;
printf("buf: ");
for(uint16_t i=0; i<10; i++)
printf("0x%02X ", rxBuffer[i]);
printf("\n");
}
if(USART1->ISR & USART_ISR_ORE){
USART1->ICR = USART_ICR_ORECF;
printf("ORE\n");
}
if(USART1->ISR & USART_ISR_NE){
USART1->ICR = USART_ICR_NECF;
printf("NE\n");
}
if(USART1->ISR & USART_ISR_UDR){
USART1->ICR = USART_ICR_UDRCF;
printf("UDR\n");
}
}
/** /**
* @brief The application entry point. * @brief The application entry point.
* @retval int * @retval int
@@ -123,8 +72,6 @@ void USART1_IRQHandler(){
int main(void) int main(void)
{ {
/* USER CODE BEGIN 1 */ /* USER CODE BEGIN 1 */
SEGGER_RTT_ConfigUpBuffer(0, NULL, NULL, 0, SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL);
printf("Moin!\n");
/* USER CODE END 1 */ /* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/ /* MCU Configuration--------------------------------------------------------*/
@@ -140,20 +87,35 @@ int main(void)
SystemClock_Config(); SystemClock_Config();
/* USER CODE BEGIN SysInit */ /* USER CODE BEGIN SysInit */
SEGGER_RTT_ConfigUpBuffer(0, NULL, NULL, 0, SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL);
printf("Moin!\n");
SEGGER_SYSVIEW_Conf(); /* Configure and initialize SystemView */
/* USER CODE END SysInit */ /* USER CODE END SysInit */
/* Initialize all configured peripherals */ /* Initialize all configured peripherals */
MX_GPIO_Init(); MX_GPIO_Init();
/* USER CODE BEGIN 2 */ /* USER CODE BEGIN 2 */
init_UART1(); init_UART1_dma();
stepper_gpio_init();
Timer1_Init();
/* USER CODE END 2 */ /* USER CODE END 2 */
/* Infinite loop */ /* Infinite loop */
/* USER CODE BEGIN WHILE */ /* USER CODE BEGIN WHILE */
//HAL_UART_Receive_DMA(&huart1, rxBuffer, BUFFER_SIZE); //uint16_t cnt = 0;
while (1) while (1)
{ {
//printf("buf: ");
//for(uint16_t i=0; i<10; i++)
// printf("0x%02X ", rxBuffer[i]);
//printf("\n");
SEGGER_SYSVIEW_OnIdle();
//if(cnt++ >= 256-rxBuffer[1]){
// cnt = 0;
// GPIOE->ODR ^= GPIO_ODR_OD2;
//}
/* USER CODE END WHILE */ /* USER CODE END WHILE */
/* USER CODE BEGIN 3 */ /* USER CODE BEGIN 3 */
@@ -182,7 +144,7 @@ void SystemClock_Config(void)
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
RCC_OscInitStruct.PLL.PLLM = RCC_PLLM_DIV1; RCC_OscInitStruct.PLL.PLLM = RCC_PLLM_DIV1;
RCC_OscInitStruct.PLL.PLLN = 8; RCC_OscInitStruct.PLL.PLLN = 16;
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
RCC_OscInitStruct.PLL.PLLQ = RCC_PLLQ_DIV2; RCC_OscInitStruct.PLL.PLLQ = RCC_PLLQ_DIV2;
RCC_OscInitStruct.PLL.PLLR = RCC_PLLR_DIV2; RCC_OscInitStruct.PLL.PLLR = RCC_PLLR_DIV2;
@@ -199,7 +161,7 @@ void SystemClock_Config(void)
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
{ {
Error_Handler(); Error_Handler();
} }

157
Src/stepper.c Normal file
View File

@@ -0,0 +1,157 @@
#include "stm32g0b1xx.h"
#include "stepper.h"
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include "SEGGER_SYSVIEW.h"
#include "uart_dmx.h"
#include "mapping_table.h"
stepper_T steppers[] = {
{.en_port=GPIOC, .en_pin=11, .dir_port=GPIOB, .dir_pin=4, .step_port=GPIOE, .step_pin=2, .home_port=GPIOF, .home_pin=3},
{.en_port=GPIOB, .en_pin=3, .dir_port=GPIOF, .dir_pin=11, .step_port=GPIOF, .step_pin=12, .home_port=GPIOF, .home_pin=4}
};
void set_pins(stepper_T* stp){
// Set direction (00: Input, 01: Output, 10: Alternate function, 11: Analog)
// enable
stp->en_port->MODER &= ~(0x3 << (stp->en_pin * 2));
stp->en_port->MODER |= (0x1 << (stp->en_pin * 2));
// direction
stp->dir_port->MODER &= ~(0x3 << (stp->dir_pin * 2));
stp->dir_port->MODER |= (0x1 << (stp->dir_pin * 2));
// step
stp->step_port->MODER &= ~(0x3 << (stp->step_pin * 2));
stp->step_port->MODER |= (0x1 << (stp->step_pin * 2));
// home switch
stp->home_port->MODER &= ~(0x3 << (stp->home_pin * 2));
// make shure stepper is enabled (active low)
stp->en_port->BSRR |= (0x1 << (stp->en_pin + 16));
}
void stepper_gpio_init(){
RCC->IOPENR |= RCC_IOPENR_GPIOBEN;
RCC->IOPENR |= RCC_IOPENR_GPIOCEN;
RCC->IOPENR |= RCC_IOPENR_GPIOEEN;
RCC->IOPENR |= RCC_IOPENR_GPIOFEN;
for(uint8_t i=0; i<(sizeof(steppers)/sizeof(stepper_T)); i++){
set_pins(&steppers[i]);
}
steppers[0].homed = 1;
steppers[1].homed = 1;
}
void Timer1_Init(void) {
// Step 1: Enable the clock for Timer 1
RCC->APBENR2 |= RCC_APBENR2_TIM1EN; // Enable TIM1 clock
// Step 2: Configure Timer 1
TIM1->PSC = 64;
TIM1->ARR = 100;
TIM1->DIER |= TIM_DIER_UIE; // Enable update interrupt
// Step 3: Enable Timer 1
TIM1->CR1 |= TIM_CR1_CEN; // Enable the timer
// Step 4: Enable the interrupt in NVIC
NVIC_EnableIRQ(TIM1_BRK_UP_TRG_COM_IRQn); // Enable Timer 1 interrupt in NVIC
}
// Timer 1 Update Interrupt Handler
void TIM1_BRK_UP_TRG_COM_IRQHandler(void) {
SEGGER_SYSVIEW_RecordEnterISR();
if (TIM1->SR & TIM_SR_UIF) { // Check if the update interrupt flag is set
TIM1->SR &= ~TIM_SR_UIF; // Clear the update interrupt flag
//SEGGER_SYSVIEW_PrintfHost("do step");
do_steps();
}
SEGGER_SYSVIEW_RecordExitISR();
}
void do_steps(){
static uint32_t timer = 0;
timer++;
for(uint8_t i=0; i<(sizeof(steppers)/sizeof(stepper_T)); i++){
if((steppers[i].ramp_to_speed != 0 && steppers[i].next_step == timer) || steppers[i].trigger_step){
/* reset trigger */
steppers[i].trigger_step = 0;
/* ramp speed */
if(steppers[i].speed < steppers[i].ramp_to_speed)
steppers[i].speed++;
if(steppers[i].speed > steppers[i].ramp_to_speed)
steppers[i].speed--;
/* limit max speed */
if(steppers[i].speed >= STEPPER_SPEED_LIMIT)
steppers[i].speed=STEPPER_SPEED_LIMIT;
if(steppers[i].speed <= -STEPPER_SPEED_LIMIT)
steppers[i].speed=-STEPPER_SPEED_LIMIT;
/* get direction from sign */
if(steppers[i].speed>0)
steppers[i].dir_port->BSRR |= 1 << steppers[i].dir_pin;
if(steppers[i].speed<0)
steppers[i].dir_port->BSRR |= 1 << (steppers[i].dir_pin + 16);
// avoid division by zero
if(steppers[i].speed != 0){
/* calculate next step time
*
* should be safe for 1 overflow; speeds which
* require longer wait times than uint32_max not supported
* */
steppers[i].next_step = timer + (1000/abs(steppers[i].speed));
/* step and count position */
steppers[i].step_port->ODR ^= 1 << steppers[i].step_pin;
if(steppers[i].speed>0)
steppers[i].pos++;
if(steppers[i].speed<0)
steppers[i].pos--;
}
else{
// dont send step at speed == 0
steppers[i].next_step = timer + 1;
}
printf("pos %d\tspeed %d\n", steppers[i].pos, steppers[i].speed);
}
if(steppers[i].homed){
static uint16_t old_ramp_to_speed;
old_ramp_to_speed = steppers[i].ramp_to_speed;
motor_mapping_T* tmp = &(((fixture_mapping_T*)&rxBuffer[1])->channels[i]);
steppers[i].ramp_to_speed = tmp->tilt - steppers[i].pos;
if(old_ramp_to_speed == 0 && steppers[i].ramp_to_speed != 0)
steppers[i].trigger_step = 1;
}
else{
if(~(steppers[i].home_port->IDR) & (1 << steppers[i].home_pin)){
steppers[i].pos = 0;
steppers[i].homed = 1;
steppers[i].speed = 0;
steppers[i].ramp_to_speed = 0;
printf("homed %d\n", i);
}
else{
if(steppers[i].ramp_to_speed == 0){
steppers[i].ramp_to_speed=10;
steppers[i].trigger_step = 1; // trigger first step
}
}
}
}
}

View File

@@ -23,6 +23,7 @@
/* Private includes ----------------------------------------------------------*/ /* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */ /* USER CODE BEGIN Includes */
#include "stdio.h" #include "stdio.h"
#include "SEGGER_SYSVIEW.h"
/* USER CODE END Includes */ /* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/ /* Private typedef -----------------------------------------------------------*/
@@ -42,7 +43,6 @@
/* Private variables ---------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/
/* USER CODE BEGIN PV */ /* USER CODE BEGIN PV */
/* USER CODE END PV */ /* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/ /* Private function prototypes -----------------------------------------------*/
@@ -126,11 +126,12 @@ void PendSV_Handler(void)
void SysTick_Handler(void) void SysTick_Handler(void)
{ {
/* USER CODE BEGIN SysTick_IRQn 0 */ /* USER CODE BEGIN SysTick_IRQn 0 */
SEGGER_SYSVIEW_TickCnt++;
SEGGER_SYSVIEW_RecordEnterISR();
/* USER CODE END SysTick_IRQn 0 */ /* USER CODE END SysTick_IRQn 0 */
HAL_IncTick(); HAL_IncTick();
/* USER CODE BEGIN SysTick_IRQn 1 */ /* USER CODE BEGIN SysTick_IRQn 1 */
SEGGER_SYSVIEW_RecordExitISR();
/* USER CODE END SysTick_IRQn 1 */ /* USER CODE END SysTick_IRQn 1 */
} }

129
Src/uart_dmx.c Normal file
View File

@@ -0,0 +1,129 @@
#include "uart_dmx.h"
#include "SEGGER_SYSVIEW.h"
#include "stdio.h"
#include "stm32g0xx_hal.h"
#include "system_stm32g0xx.h"
uint8_t rxBuffer[BUFFER_SIZE];
uint16_t rxBufferPos = 0;
void init_UART1_it(){
RCC->APBENR2 |= RCC_APBENR2_USART1EN;
RCC->IOPENR |= RCC_IOPENR_GPIOCEN;
GPIOC->MODER &= ~GPIO_MODER_MODE5; // Alternate function mode on RX pin
GPIOC->MODER |= GPIO_MODER_MODE5_1;
GPIOC->AFR[0] &= GPIO_AFRL_AFSEL5;
GPIOC->AFR[0] |= 1 << GPIO_AFRL_AFSEL5_Pos; // AF1 -> USART1 RX
USART1->BRR = 128; // 32000000÷250000
USART1->CR1 = USART_CR1_RE;
USART1->CR3 |= USART_CR3_EIE; // Interrupt on BREAK (and other errors)
USART1->CR1 |= USART_CR1_RXNEIE_RXFNEIE; // RX Interrupt
USART1->CR1 |= USART_CR1_UE;
HAL_NVIC_SetPriority(USART1_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(USART1_IRQn);
}
void init_UART1_dma(){
RCC->IOPENR |= RCC_IOPENR_GPIOCEN;
RCC->APBENR2 |= RCC_APBENR2_USART1EN;
RCC->AHBENR |= RCC_AHBENR_DMA1EN;
GPIOC->MODER &= ~GPIO_MODER_MODE5; // Alternate function mode on RX pin
GPIOC->MODER |= GPIO_MODER_MODE5_1;
GPIOC->AFR[0] &= GPIO_AFRL_AFSEL5;
GPIOC->AFR[0] |= 1 << GPIO_AFRL_AFSEL5_Pos; // AF1 -> USART1 RX
USART1->BRR = SystemCoreClock / 250000; // 64000000÷250000
USART1->CR1 = USART_CR1_RE;
USART1->CR3 |= USART_CR3_EIE; // Interrupt on BREAK (and other errors)
USART1->CR3 |= USART_CR3_DMAR; // DMA Receiver mode
DMA1_Channel1->CCR = (0x02 << DMA_CCR_PL_Pos) | DMA_CCR_MINC | DMA_CCR_TCIE;
DMA1_Channel1->CMAR = ( uint32_t )&rxBuffer[0];
DMA1_Channel1->CPAR = ( uint32_t )&(USART1->RDR);
DMA1_Channel1->CNDTR = 5;
DMAMUX1_Channel0->CCR &= ~( DMAMUX_CxCR_DMAREQ_ID );
DMAMUX1_Channel0->CCR |= ( 50 << DMAMUX_CxCR_DMAREQ_ID_Pos ); // 50 -> USART1 RX
USART1->CR1 |= USART_CR1_UE;
HAL_NVIC_SetPriority(USART1_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(USART1_IRQn);
HAL_NVIC_SetPriority(DMA1_Channel1_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(DMA1_Channel1_IRQn);
}
void Reset_DMA(void) {
// Disable the DMA channel
DMA1_Channel1->CCR &= ~DMA_CCR_EN; // Disable DMA Channel 1
// Clear the transfer complete flag
DMA1->IFCR |= DMA_IFCR_CTCIF1; // Clear transfer complete flag for Channel 1
// Reconfigure the DMA
DMA1_Channel1->CMAR = (uint32_t)rxBuffer; // Set memory address to the start of the buffer
DMA1_Channel1->CNDTR = BUFFER_SIZE; // Set number of data items to transfer
// Enable the DMA channel again
DMA1_Channel1->CCR |= DMA_CCR_EN; // Enable DMA Channel 1
}
void USART1_IRQHandler(){
SEGGER_SYSVIEW_RecordEnterISR();
if(USART1->ISR & USART_ISR_RXNE_RXFNE){
//SEGGER_SYSVIEW_PrintfHost("RXNE");
//printf("%x ", USART1->RDR);
rxBuffer[rxBufferPos++] = USART1->RDR;
if(rxBufferPos >= BUFFER_SIZE){
rxBufferPos = 0;
}
}
if(USART1->ISR & USART_ISR_FE){
//TODO read rx==0
USART1->ICR = USART_ICR_FECF;
//if(rxBufferPos != 514)
// printf("FE after %d\n",rxBufferPos);
//rxBufferPos = 0;
//DMA1_Channel1->CNDTR = 1;
SEGGER_SYSVIEW_PrintfHost("FE");
Reset_DMA();
//DMA1_Channel1->CCR &= ~( DMA_CCR_EN );
//DMA1_Channel1->CNDTR = 512;
//DMA1_Channel1->CMAR = ( uint32_t )&rxBuffer[0];
//DMA1_Channel1->CCR |= ( DMA_CCR_EN );
////DMA1_Channel1->CCR |= ( DMA_CCR_EN );
}
if(USART1->ISR & USART_ISR_ORE){
USART1->ICR = USART_ICR_ORECF;
//printf("ORE\n");
//SEGGER_SYSVIEW_PrintfHost("ORE");
}
if(USART1->ISR & USART_ISR_NE){
USART1->ICR = USART_ICR_NECF;
printf("NE\n");
}
if(USART1->ISR & USART_ISR_UDR){
USART1->ICR = USART_ICR_UDRCF;
printf("UDR\n");
}
SEGGER_SYSVIEW_RecordExitISR();
}
void DMA1_Channel1_IRQHandler(){
SEGGER_SYSVIEW_RecordEnterISR();
if(DMA1->ISR & DMA_ISR_TCIF1){
DMA1->IFCR = DMA_IFCR_CTCIF1;
}
SEGGER_SYSVIEW_PrintfHost("DMA");
SEGGER_SYSVIEW_RecordExitISR();
}

View File

@@ -9,7 +9,10 @@
-IDrivers/CMSIS/Include -IDrivers/CMSIS/Include
-IDrivers/RTT/Config -IDrivers/RTT/Config
-IDrivers/RTT/RTT -IDrivers/RTT/RTT
-Og -IDrivers/SystemView/Config
-IDrivers/SystemView/SEGGER
-IDrivers/SystemView/SYSVIEW
-O0
-Wall -Wall
-fdata-sections -fdata-sections
-ffunction-sections -ffunction-sections

257
docs/schematic.drawio Normal file
View File

@@ -0,0 +1,257 @@
<mxfile host="Electron" modified="2025-04-28T12:33:33.866Z" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/22.1.2 Chrome/114.0.5735.289 Electron/25.9.4 Safari/537.36" etag="EI7Aw-TNnqPbeWTsstNB" version="22.1.2" type="device">
<diagram name="Seite-1" id="_rB38n3-t7QUQ63QpIv4">
<mxGraphModel dx="754" dy="441" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="583" pageHeight="827" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="9vde1n3-oVz1CaPuqj4n-1" value="" style="whiteSpace=wrap;html=1;aspect=fixed;" parent="1" vertex="1">
<mxGeometry x="120" y="200" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="9vde1n3-oVz1CaPuqj4n-2" value="" style="whiteSpace=wrap;html=1;aspect=fixed;" parent="1" vertex="1">
<mxGeometry x="230" y="200" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="9vde1n3-oVz1CaPuqj4n-3" value="" style="whiteSpace=wrap;html=1;aspect=fixed;" parent="1" vertex="1">
<mxGeometry x="340" y="200" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="9vde1n3-oVz1CaPuqj4n-4" value="Mantis" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="120" y="160" width="80" height="20" as="geometry" />
</mxCell>
<mxCell id="9vde1n3-oVz1CaPuqj4n-5" value="Mantis" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="120" y="300" width="80" height="20" as="geometry" />
</mxCell>
<mxCell id="9vde1n3-oVz1CaPuqj4n-6" value="Mantis" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="230" y="160" width="80" height="20" as="geometry" />
</mxCell>
<mxCell id="9vde1n3-oVz1CaPuqj4n-7" value="Mantis" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="230" y="300" width="80" height="20" as="geometry" />
</mxCell>
<mxCell id="9vde1n3-oVz1CaPuqj4n-8" value="Mantis" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="340" y="160" width="80" height="20" as="geometry" />
</mxCell>
<mxCell id="9vde1n3-oVz1CaPuqj4n-9" value="Mantis" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="340" y="300" width="80" height="20" as="geometry" />
</mxCell>
<mxCell id="9vde1n3-oVz1CaPuqj4n-15" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" parent="1" source="9vde1n3-oVz1CaPuqj4n-10" target="9vde1n3-oVz1CaPuqj4n-7" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="9vde1n3-oVz1CaPuqj4n-16" value="DMX" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" parent="1" source="9vde1n3-oVz1CaPuqj4n-10" target="9vde1n3-oVz1CaPuqj4n-9" edge="1">
<mxGeometry x="0.0833" y="-10" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="9vde1n3-oVz1CaPuqj4n-17" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" parent="1" source="9vde1n3-oVz1CaPuqj4n-10" target="9vde1n3-oVz1CaPuqj4n-5" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="9vde1n3-oVz1CaPuqj4n-10" value="PI CM4" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="120" y="120" width="50" height="40" as="geometry" />
</mxCell>
<mxCell id="9vde1n3-oVz1CaPuqj4n-12" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="9vde1n3-oVz1CaPuqj4n-10" target="9vde1n3-oVz1CaPuqj4n-6" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="9vde1n3-oVz1CaPuqj4n-13" value="DMX" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="9vde1n3-oVz1CaPuqj4n-10" target="9vde1n3-oVz1CaPuqj4n-8" edge="1">
<mxGeometry x="-0.5873" y="10" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-5" value="" style="group" parent="1" vertex="1" connectable="0">
<mxGeometry x="120" y="180" width="79.8195238095239" height="20" as="geometry" />
</mxCell>
<mxCell id="9vde1n3-oVz1CaPuqj4n-21" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-5" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="0.009523809523898308" as="sourcePoint" />
<mxPoint y="20" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-5" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="20.0095238095239" as="sourcePoint" />
<mxPoint x="20" y="20" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-5" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="39.909523809523904" as="sourcePoint" />
<mxPoint x="39.900000000000006" y="20" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-5" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="60.0095238095239" as="sourcePoint" />
<mxPoint x="60" y="20" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-4" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-5" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="79.8195238095239" as="sourcePoint" />
<mxPoint x="79.81" y="20" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-12" value="" style="group" parent="1" vertex="1" connectable="0">
<mxGeometry x="230" y="180" width="79.8195238095239" height="20" as="geometry" />
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-13" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-12" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="0.009523809523898308" as="sourcePoint" />
<mxPoint y="20" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-14" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-12" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="20.0095238095239" as="sourcePoint" />
<mxPoint x="20" y="20" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-15" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-12" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="39.909523809523904" as="sourcePoint" />
<mxPoint x="39.900000000000006" y="20" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-16" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-12" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="60.0095238095239" as="sourcePoint" />
<mxPoint x="60" y="20" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-17" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-12" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="79.8195238095239" as="sourcePoint" />
<mxPoint x="79.81" y="20" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-24" value="" style="group" parent="1" vertex="1" connectable="0">
<mxGeometry x="340" y="180" width="79.8195238095239" height="20" as="geometry" />
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-25" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-24" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="0.009523809523898308" as="sourcePoint" />
<mxPoint y="20" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-26" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-24" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="20.0095238095239" as="sourcePoint" />
<mxPoint x="20" y="20" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-27" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-24" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="39.909523809523904" as="sourcePoint" />
<mxPoint x="39.900000000000006" y="20" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-28" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-24" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="60.0095238095239" as="sourcePoint" />
<mxPoint x="60" y="20" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-29" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-24" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="79.8195238095239" as="sourcePoint" />
<mxPoint x="79.81" y="20" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-30" value="" style="group;rotation=-180;" parent="1" vertex="1" connectable="0">
<mxGeometry x="120" y="280" width="79.8195238095239" height="20" as="geometry" />
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-31" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-30" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="80" y="20" as="sourcePoint" />
<mxPoint x="80" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-32" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-30" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="60" y="20" as="sourcePoint" />
<mxPoint x="60" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-33" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-30" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="40" y="20" as="sourcePoint" />
<mxPoint x="40" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-34" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-30" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="20" y="20" as="sourcePoint" />
<mxPoint x="20" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-35" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-30" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint y="20" as="sourcePoint" />
<mxPoint as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-36" value="" style="group;rotation=-180;" parent="1" vertex="1" connectable="0">
<mxGeometry x="230" y="280" width="79.8195238095239" height="20" as="geometry" />
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-37" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-36" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="80" y="20" as="sourcePoint" />
<mxPoint x="80" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-38" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-36" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="60" y="20" as="sourcePoint" />
<mxPoint x="60" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-39" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-36" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="40" y="20" as="sourcePoint" />
<mxPoint x="40" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-40" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-36" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="20" y="20" as="sourcePoint" />
<mxPoint x="20" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-41" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-36" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint y="20" as="sourcePoint" />
<mxPoint as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-42" value="" style="group;rotation=-180;" parent="1" vertex="1" connectable="0">
<mxGeometry x="340" y="280" width="79.8195238095239" height="20" as="geometry" />
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-43" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-42" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="80" y="20" as="sourcePoint" />
<mxPoint x="80" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-44" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-42" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="60" y="20" as="sourcePoint" />
<mxPoint x="60" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-45" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-42" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="40" y="20" as="sourcePoint" />
<mxPoint x="40" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-46" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-42" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="20" y="20" as="sourcePoint" />
<mxPoint x="20" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="pmsy6Yo1mVgsH6J7jIt1-47" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#f8cecc;strokeColor=#b85450;" parent="pmsy6Yo1mVgsH6J7jIt1-42" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint y="20" as="sourcePoint" />
<mxPoint as="targetPoint" />
</mxGeometry>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

BIN
docs/schematic.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB