commit 011591b3f689bb3d80c5987bd35d28a0e29b9f86
parent e1a139bcaea40cf0c791d0d06248ae46fc9bc0d6
Author: Martin Klöckner <mjkloeckner@gmail.com>
Date: Wed, 1 Apr 2026 00:47:13 -0300
Actualizar `firmware/README.md` y `firmware/app/README.md`
Diffstat:
2 files changed, 35 insertions(+), 27 deletions(-)
diff --git a/firmware/README.md b/firmware/README.md
@@ -1,21 +1,38 @@
# Firmware
-This is an example/template of a bare metal, event triggered application that
-runs tasks secuentally for STM32 boards using HAL library, in particular
-STM32F103RB on NUCLEO-F103RB board.
+En esta carpeta se encuentra el firmware para el proyecto de controlador de
+derretidor de miel. A gran nivel se trata de una única aplicación que tiene
+asociada multiples tareas. Esta aplicación se actualiza en cada milisegundo y al
+actualizarse actualiza cada tarea asociada.
-In this case one of the tasks reads temperature from a ds18b20 sensor attached
-to UART1 in Half-Duplex OneWire mode.
+Las tareas se asocian a la aplicación en el archivo `app/src/app.c` al momento
+de iniciar la liste de tareas, como se muestra a continuación.
-## Execution stack
+```c
+const task_cfg_t task_cfg_list[] = {
+ {task_system_init, task_system_update, &shared_data},
+ {task_buttons_init, task_buttons_update, NULL},
+ {task_leds_init, task_leds_update, NULL},
+ {task_menu_init, task_menu_update, &shared_data},
+ {task_temp_ctrl_init, task_temp_ctrl_update, &shared_data},
+ {task_temp_sensor_init, task_temp_sensor_update, &shared_data},
+};
+```
+
+La tarea central es `task_system`, esta tarea recibe y envía eventos;
+principalmente recibe de `task_buttons` que se encarga de escrutar el estado de
+los botones y principalmente envia a las tareas `tsak_temp_ctrl`, `task_leds` y
+`task_menu`. Las tareas restantes se puede decir que no interactúan con
+`task_system` mediante eventos si no que lo hacen a través de parámetros
+compartidos, estas tareas son `task_temp_sensor` y `task_temp_ctrl`.
+
+Los archivos correspondientes a la aplicación se encuentran en la carpeta
+`app`. Las carpetas `Core` y `Drivers` se generan automaticamente por CubeMX. En
+la carpeta `Core` se encuentra el punto de entrada (la funcion `main`) asi como
+también archivos de inicialización y manejo de interrupciones, como
+`startup_stm32f103rbtx.s` y `stm32f1xx_it.c`, respectivamente. La carpeta
+`Drivers` contiene todos los archivos relacionados con la capa de abstracción
+HAL (Hardware Abstraction Layer).
-The main loop calls the main app and then this app executes the attached tasks
-secuentially in order: `task_sensor`, `task_system` and `task_actuator`.
-## Debug
-In Stm32CubeIDE Project Explorer view right click over the project, then debug
-configurations. In Debugger tab set Debug probe as ST-LINK (OpenOCD) and after
-pressing Show generator options setupReset Mode as Software system reset.
-In Startup tab add 'monitor arm semihosting enable' to the initialization
-commands. Finally Apply and Close (or Debug).
diff --git a/firmware/app/README.md b/firmware/app/README.md
@@ -1,9 +1,8 @@
-# app folder
+# `app` folder
-In this folder the main app source code is stores. The main app consists of
-three tasks that are run sequentially one after the other. Task sensor, system
-and actuator. The app is updated on every tick (1 ms) and the app calls the
-update method of every task.
+In this folder the main app source code is stored. The main app consists of
+several tasks that are run sequentially one after the other. This tasks are
+updated on every ms.
## Files
@@ -25,14 +24,6 @@ Non-Blocking Code -> System Modeling
Non-Blocking Code
-### `task_actuator*`
-
-Non-Blocking & Update By Time Code -> Actuator Modeling
-
-### `task_actuator_interface.*`
-
-Non-Blocking Code
-
### `logger.*`
Utilities for Retarget "printf" to Console