Commit 7fe16fb6 authored by Alessio Igor Bogani's avatar Alessio Igor Bogani
Browse files

Changes

parent a790b671
......@@ -8,7 +8,7 @@
/****************************************************************************/
-cr /* Link using C conventions */
-stack 0x800
-stack 0x1400
-heap 0x000
/* Specify the System Memory Map */
......
......@@ -80,9 +80,12 @@ volatile register uint32_t __R31;
#define PRU1
#define benchmark1
#if 0
#ifndef PRU_SRAM
#define PRU_SRAM __far __attribute__((cregister("PRU_SHAREDMEM", near)))
#endif
#else
#endif
#pragma LOCATION(ScaleA0,0x0000)
#pragma LOCATION(ScaleA1,0x0004)
......@@ -124,13 +127,21 @@ struct pru2pru_data_transfer {
} p2pdt;
volatile float OCnorm, OCnorm_previous;
#if 0
#define MAX_SRAM_SAMPLES 1000
#else
#define MAX_SRAM_SAMPLES 100
#endif
struct pru2user_data_transfer {
float OCnorm;
unsigned int OVnorm;
unsigned int num5ns;
};
#if 0
PRU_SRAM struct pru2user_data_transfer p2udt[MAX_SRAM_SAMPLES];
#else
struct pru2user_data_transfer p2udt[MAX_SRAM_SAMPLES];
#endif
void SetSPI();
void SetADCBB();
......@@ -297,14 +308,14 @@ int main(void)
p2udt[HEAD_index].num5ns = PRU1_CTRL.CYCLE;
HEAD_index++;
if (HEAD_index >= 40) {
if (HEAD_index >= 100) {
Debug2++; // Notification
if (pru_rpmsg_send(&transport, dst, src, &p2udt,
sizeof(struct pru2user_data_transfer) * 40) != PRU_RPMSG_SUCCESS) {
sizeof(struct pru2user_data_transfer) * 100) != PRU_RPMSG_SUCCESS) {
Debug3++; // Notifications failed
} else {
HEAD_index -= 40;
HEAD_index -= 100;
}
}
#if 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment