From 5f68c7a1b5c8dec82d4a2e1e12443a41b5196b1d Mon Sep 17 00:00:00 2001 From: Dawsyn Schraiber Date: Thu, 9 May 2024 01:34:24 -0400 Subject: 02/24/2024 Dalzell Test Launch Version (BB Black) --- src/pru/pwm_test.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/pru/pwm_test.c') diff --git a/src/pru/pwm_test.c b/src/pru/pwm_test.c index df8bbf0..9c19314 100644 --- a/src/pru/pwm_test.c +++ b/src/pru/pwm_test.c @@ -18,6 +18,7 @@ #define CYCLES_PER_SECOND 200000000 #define CYCLES_PER_PERIOD (CYCLES_PER_SECOND / 800) +#define PRU_TIMER_PASSCODE 0x31138423 uint32_t *pru0DRAM_32int_ptr; // Points to the start of local DRAM uint32_t *pru1DRAM_32int_ptr; // Points to the start of local DRAM @@ -38,6 +39,7 @@ int start_pwm_count(uint32_t duty_cycle) { printf("old:\n\tcountOn: %d, countOff: %d, count: %d\nnew:\n\tcountOn: %d, countOff: %d, count: %d\n", old_count_on, old_count_off, old_count_off + old_count_on, new_count_on, new_count_off, new_count_off + new_count_on); // write to PRU shared memory + pruDRAM_32int_ptr[1] = PRU_TIMER_PASSCODE; pruDRAM_32int_ptr[0] = duty_cycle; // On time return 0; } -- cgit v1.2.3