Skip to content

Commit

Permalink
Merge pull request #138 from intechstudio/BENB-pico-profiling
Browse files Browse the repository at this point in the history
BENB pico profiling
  • Loading branch information
SukuWc authored Jan 6, 2025
2 parents 103673f + c7257a6 commit ebb594e
Show file tree
Hide file tree
Showing 21 changed files with 1,461 additions and 675 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ lists.py
out.json
codeql-db
iperf
vmp/build
3 changes: 3 additions & 0 deletions grid_esp/components/grid_esp32_port/grid_esp32_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ static void IRAM_ATTR my_post_trans_cb(spi_slave_transaction_t* trans) {
return;
}

// reset timeout counter
por->partner_last_timestamp = grid_platform_rtc_get_micros();

// struct grid_buffer* rx_buffer = uart_buffer_rx_array[por->index];
// grid_buffer_write_from_chunk(rx_buffer, message, length);

Expand Down
1 change: 1 addition & 0 deletions grid_pico/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ CMakeCache.txt
elf2uf2
generated
pioasm
/main/vmp/build
6 changes: 6 additions & 0 deletions grid_pico/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ add_executable(main
grid_pico_platform.c
../../grid_common/grid_msg.c
../../grid_common/grid_port.c
pico_pool.c
pico_swsr.c
vmp/vmp_def.c
../../vmp/vmp.c
)

target_include_directories(main PRIVATE ../../vmp)

pico_generate_pio_header(main ${CMAKE_CURRENT_LIST_DIR}/uart_tx.pio)

pico_generate_pio_header(main ${CMAKE_CURRENT_LIST_DIR}/uart_rx.pio)
Expand Down
4 changes: 2 additions & 2 deletions grid_pico/main/grid_pico_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#include <stdio.h>
#include <stdlib.h>

uint64_t grid_platform_rtc_get_micros(void) { return time_us_64(); }
// uint64_t grid_platform_rtc_get_micros(void) { return time_us_64(); }

uint64_t grid_platform_rtc_get_elapsed_time(uint64_t told) { return time_us_64() - told; }
// uint64_t grid_platform_rtc_get_elapsed_time(uint64_t told) { return time_us_64() - told; }

void* grid_platform_allocate_volatile(size_t size) {

Expand Down
4 changes: 2 additions & 2 deletions grid_pico/main/grid_pico_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
#include <stddef.h>
#include <stdint.h>

uint64_t grid_platform_rtc_get_micros(void);
uint64_t grid_platform_rtc_get_elapsed_time(uint64_t told);
// uint64_t grid_platform_rtc_get_micros(void);
// uint64_t grid_platform_rtc_get_elapsed_time(uint64_t told);
void* grid_platform_allocate_volatile(size_t size);
Loading

0 comments on commit ebb594e

Please sign in to comment.