-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First WSPR-modulated emission. Start checking.
- Loading branch information
Showing
9 changed files
with
200 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
#include <stdint.h> | ||
|
||
#include "pico-hf-oscillator/lib/assert.h" | ||
#include <piodco.h> | ||
#include "defines.h" | ||
|
||
extern PioDco DCO; | ||
|
||
/* This is the code of dedicated core. | ||
We deal with extremely precise real-time task. */ | ||
void Core1Entry() | ||
{ | ||
const uint32_t clkhz = PLL_SYS_MHZ * MHz; | ||
const uint32_t freq_hz = WSPR_DIAL_FREQ_HZ + WSPR_SHIFT_FREQ_HZ; | ||
|
||
/* Initialize DCO */ | ||
assert_(0 == PioDCOInit(&DCO, 6, clkhz)); | ||
|
||
/* Run DCO. */ | ||
PioDCOStart(&DCO); | ||
|
||
/* Set initial freq. */ | ||
assert_(0 == PioDCOSetFreq(&DCO, freq_hz, 0u)); | ||
|
||
/* Run the main DCO algorithm. It spins forever. */ | ||
PioDCOWorker(&DCO); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include <string.h> | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
|
||
#include "pico/stdlib.h" | ||
#include "hardware/clocks.h" | ||
|
||
#include "defines.h" | ||
|
||
void InitPicoHW(void) | ||
{ | ||
gpio_init(PICO_DEFAULT_LED_PIN); | ||
gpio_set_dir(PICO_DEFAULT_LED_PIN, GPIO_OUT); | ||
|
||
const uint32_t clkhz = PLL_SYS_MHZ * 1000000L; | ||
set_sys_clock_khz(clkhz / kHz, true); | ||
|
||
clock_configure(clk_peri, 0, | ||
CLOCKS_CLK_PERI_CTRL_AUXSRC_VALUE_CLKSRC_PLL_SYS, | ||
PLL_SYS_MHZ * MHZ, | ||
PLL_SYS_MHZ * MHZ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters