Skip to content

Commit

Permalink
switch back to regular kernel (non RT)
Browse files Browse the repository at this point in the history
  • Loading branch information
orgua committed Apr 27, 2024
1 parent e1ab405 commit 5494316
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/build_pru_gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,3 @@ jobs:
make PROTO=SBW
${{ env.PRU_GCC }}/bin/pru-size gen_gcc/pru0-programmer-SBW-fw.elf
working-directory: "software/firmware/pru0-programmer/"

- name: Build Sync (GPIO-Event) 🧱
run: |
make
${{ env.PRU_GCC }}/bin/pru-size gen_gcc/pru1-sync-fw.elf
working-directory: "software/firmware/pru1-sync/"
4 changes: 2 additions & 2 deletions deploy/roles/maintenance/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ maintenance_delete_unused_files: true

# rule config
maintenance_default_kernel: lts-4_19
maintenance_kernel_pin: "linux-image-4.19.94-ti-rt-r74" # 2023-10-02: r74 was newest
# RT -> wanted for ptp and phc2sys (more reliable)
maintenance_kernel_pin: "linux-image-4.19.94-ti-r74" # 2024-04-27: r74 was newest
# -rt -> used for more reliable ptp & gpio-triggering, BUT communication with PRU fails
maintenance_timezone: Europe/Berlin
7 changes: 4 additions & 3 deletions software/kernel-module/src/pru_sync_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,15 +200,16 @@ int sync_init(uint32_t timer_period_ns)
trigger_loop_period_kt = ns_to_ktime(trigger_loop_period_ns);
//printk(KERN_INFO "shprd.k: new timer_period_ns = %u", trigger_loop_period_ns);

hrtimer_init(&trigger_loop_timer, CLOCK_REALTIME, HRTIMER_MODE_ABS_HARD);
hrtimer_init(&trigger_loop_timer, CLOCK_REALTIME, HRTIMER_MODE_ABS);
// TODO: HRTIMER_MODE_ABS_HARD wanted, but _HARD not defined in 4.19 (without -RT)
trigger_loop_timer.function = &trigger_loop_callback;

/* timer for Sync-Loop */
hrtimer_init(&sync_loop_timer, CLOCK_REALTIME, HRTIMER_MODE_ABS);
sync_loop_timer.function = &sync_loop_callback;

init_done = 1;
printk(KERN_INFO "shprd.k: pru-sync-system initialized");
printk(KERN_INFO "shprd.k: pru-sync-system initialized (wanted: hres, abs, hard)");

printk(KERN_INFO "shprd.k: trigger_hrtimer.hres = %d",
hrtimer_is_hres_active(&trigger_loop_timer));
Expand Down Expand Up @@ -268,7 +269,7 @@ void sync_start(void)
}

hrtimer_start(&trigger_loop_timer, ts_now_kt + ns_to_ktime(ns_to_next_trigger),
HRTIMER_MODE_ABS_HARD);
HRTIMER_MODE_ABS); // was: HRTIMER_MODE_ABS_HARD for -rt Kernel

hrtimer_start(&sync_loop_timer, ts_now_kt + ns_to_ktime(1000000), HRTIMER_MODE_ABS);
printk(KERN_INFO "shprd.k: pru-sync-system started");
Expand Down

0 comments on commit 5494316

Please sign in to comment.