Merge branch 'buzzy_integration' of gitea.iten.pro:edi/buzzer_2 into buzzy_integration
This commit is contained in:
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -5,5 +5,6 @@
|
||||
],
|
||||
"nrf-connect.boardRoots": [
|
||||
"${workspaceFolder}/firmware"
|
||||
]
|
||||
],
|
||||
"cmake.sourceDirectory": "C:/Projekte/buzzer_2/firmware/libs/ble_mgmt"
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION_MAJOR = 0
|
||||
VERSION_MINOR = 0
|
||||
PATCHLEVEL = 2
|
||||
PATCHLEVEL = 6
|
||||
VERSION_TWEAK = 0
|
||||
#if (IS_ENABLED(CONFIG_LOG))
|
||||
EXTRAVERSION = debug
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
reg = <0>;
|
||||
spi-max-frequency = <8000000>;
|
||||
jedec-id = [c2 28 17];
|
||||
size = <DT_SIZE_M(8)>;
|
||||
size = <DT_SIZE_M(64)>;
|
||||
has-dpd;
|
||||
t-enter-dpd = <10000>;
|
||||
t-exit-dpd = <35000>;
|
||||
@@ -183,7 +183,7 @@
|
||||
// compatible = "nordic,qspi-nor";
|
||||
// reg = <0>;
|
||||
// jedec-id = [c2 28 17];
|
||||
// size = <DT_SIZE_M(8)>;
|
||||
// size = <DT_SIZE_M(64)>;
|
||||
// has-dpd;
|
||||
// t-enter-dpd = <10000>;
|
||||
// t-exit-dpd = <35000>;
|
||||
|
||||
23
firmware/fs/buzzy.json
Normal file
23
firmware/fs/buzzy.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"firmware_config": {
|
||||
"peripheral": "QSPI",
|
||||
"compress": true
|
||||
},
|
||||
"pins": {
|
||||
"sck": 2,
|
||||
"csn": 5,
|
||||
"io0": 29,
|
||||
"io1": 30,
|
||||
"io2": 31,
|
||||
"io3": 45
|
||||
},
|
||||
"flash_size": 8388608,
|
||||
"sck_frequency": 8000000,
|
||||
"address_mode": "MODE24BIT",
|
||||
"readoc": "READ4IO",
|
||||
"writeoc": "PP4IO",
|
||||
"pp_size": "PPSIZE256",
|
||||
"sck_delay": 0,
|
||||
"rx_delay": 2,
|
||||
"page_size": 4096
|
||||
}
|
||||
46
firmware/fs/buzzy.toml
Normal file
46
firmware/fs/buzzy.toml
Normal file
@@ -0,0 +1,46 @@
|
||||
[qspi]
|
||||
mem_size = 0x800000
|
||||
read_mode = "READ4IO"
|
||||
write_mode = "PP4IO"
|
||||
address_mode = "BIT24"
|
||||
frequency = "M16"
|
||||
spi_mode = "MODE0"
|
||||
rx_delay = 2
|
||||
wip_index = 0
|
||||
page_program_size = "PAGE256"
|
||||
retain_ram = true
|
||||
|
||||
# Pin-Zuweisungen (angepasst an die Netlist)
|
||||
[qspi.sck]
|
||||
delay = 0x80
|
||||
pin = 2
|
||||
port = 0
|
||||
|
||||
[qspi.csn]
|
||||
pin = 5
|
||||
port = 0
|
||||
|
||||
[qspi.dio0]
|
||||
pin = 29
|
||||
port = 0
|
||||
|
||||
[qspi.dio1]
|
||||
pin = 30
|
||||
port = 0
|
||||
|
||||
[qspi.dio2]
|
||||
pin = 31
|
||||
port = 0
|
||||
|
||||
[qspi.dio3]
|
||||
pin = 13
|
||||
port = 1
|
||||
|
||||
[qspi.custom]
|
||||
io2_level = "LEVEL_LOW"
|
||||
io3_level = "LEVEL_HIGH"
|
||||
# Aktiviert Quad-IO und High-Performance Mode für Macronix MX25R
|
||||
instructions = [
|
||||
{command=0x06, data=[]},
|
||||
{command=0x01, data=[0x40, 0, 0x2]}
|
||||
]
|
||||
1
firmware/fs/program.bat
Normal file
1
firmware/fs/program.bat
Normal file
@@ -0,0 +1 @@
|
||||
nrfutil device --x-ext-mem-config-file buzzy.json program --firmware \\10.0.10.30\edi\nrf_playground\lasertag\firmware\tools\littlefs_generator\lfs_external_flash.hex --options verify=VERIFY_READ,reset=RESET_SYSTEM
|
||||
@@ -1,6 +1,6 @@
|
||||
menuconfig BUZZ_AUDIO
|
||||
bool "Audio handling"
|
||||
default y
|
||||
default n
|
||||
select I2S
|
||||
select POLL
|
||||
|
||||
|
||||
@@ -246,8 +246,10 @@ int ble_mgmt_init(ble_mgmt_rx_cb_t rx_cb, const char *device_name)
|
||||
}
|
||||
|
||||
const char *name_to_use = (device_name != NULL) ? device_name : CONFIG_BLE_MGMT_DEFAULT_DEVICE_NAME;
|
||||
LOG_INF("BLE init: set_device_name");
|
||||
set_device_name(name_to_use);
|
||||
|
||||
LOG_INF("BLE init: bt_le_adv_start");
|
||||
rc = bt_le_adv_start(&adv_param, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd));
|
||||
if (rc)
|
||||
{
|
||||
|
||||
5
firmware/pm_static.yml
Normal file
5
firmware/pm_static.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
# External Flash
|
||||
littlefs_storage:
|
||||
address: 0x0
|
||||
size: 0x800000
|
||||
region: external_flash
|
||||
1
firmware/program.bat
Normal file
1
firmware/program.bat
Normal file
@@ -0,0 +1 @@
|
||||
nrfutil device --x-ext-mem-config-file buzzy.json program --firmware \\10.0.10.30\edi\nrf_playground\lasertag\firmware\tools\littlefs_generator\lfs_external_flash.hex --options verify=VERIFY_READ,reset=RESET_SYSTEM
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "fs_mgmt.h"
|
||||
#include "buzz_proto.h"
|
||||
#include "fw_mgmt.h"
|
||||
#include "audio.h"
|
||||
// #include "audio.h"
|
||||
|
||||
LOG_MODULE_REGISTER(main);
|
||||
|
||||
@@ -44,6 +44,7 @@ void ble_rx_cb(const uint8_t *data, uint16_t len)
|
||||
buzz_proto_buf_free(&buf); /* Speicher bei Fehler sofort wieder freigeben */
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
int main(void)
|
||||
@@ -55,13 +56,19 @@ int main(void)
|
||||
LOG_ERR("Failed to initialize BLE management: %d", rc);
|
||||
return rc;
|
||||
}
|
||||
LOG_WRN("After BLE init");
|
||||
#else
|
||||
LOG_WRN("BLE not enabled");
|
||||
#endif
|
||||
|
||||
LOG_INF("Init complete.");
|
||||
LOG_WRN("Main park loop active");
|
||||
|
||||
k_sleep(K_MSEC(500));
|
||||
LOG_INF("Playing test audio files...");
|
||||
audio_queue_play("/lfs/sys/update", false);
|
||||
audio_queue_play("/lfs/sys/confirm", false);
|
||||
k_sleep(K_FOREVER);
|
||||
// k_sleep(K_MSEC(500));
|
||||
// LOG_INF("Playing test audio files...");
|
||||
// audio_queue_play("/lfs/sys/update", false);
|
||||
// audio_queue_play("/lfs/sys/confirm", false);
|
||||
for (;;) {
|
||||
int32_t rem_ms = k_sleep(K_FOREVER);
|
||||
LOG_WRN("main woke unexpectedly (remaining=%d ms)", rem_ms);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user