App to configure a DDS (AD9854) using a K64F. USB an Ethernet were used as interface.

Dependencies:   jro mbed AD9854 mbed-rtos I2CLCD k64f_EthLink SerialDriver FreescaleIAP EthernetInterface

Committer:
miguelcordero191
Date:
Thu Sep 05 17:16:31 2019 +0000
Revision:
7:28725fb9a337
Parent:
3:f84802422619
2019_puerto2001

Who changed what in which revision?

UserRevisionLine numberNew contents of line
miguelcordero191 3:f84802422619 1 #include "mbed.h"
miguelcordero191 3:f84802422619 2 #include "FreescaleIAP.h"
miguelcordero191 3:f84802422619 3
miguelcordero191 3:f84802422619 4 #if 0
miguelcordero191 3:f84802422619 5 int main() {
miguelcordero191 3:f84802422619 6 int address = flash_size() - SECTOR_SIZE; //Write in last sector
miguelcordero191 3:f84802422619 7
miguelcordero191 3:f84802422619 8 int *data = (int*)address;
miguelcordero191 3:f84802422619 9 char *data_str = (char*)address;
miguelcordero191 3:f84802422619 10 printf("Starting\r\n");
miguelcordero191 3:f84802422619 11 erase_sector(address);
miguelcordero191 3:f84802422619 12 int numbers[10] = {0, 1, 10, 100, 1000, 10000, 1000000, 10000000, 100000000, 1000000000};
miguelcordero191 3:f84802422619 13 char *ip = "a12b3c4d5";
miguelcordero191 3:f84802422619 14 //program_flash(address, (char*)&numbers, 40); //10 integers of 4 bytes each: 40 bytes length
miguelcordero191 3:f84802422619 15 program_flash(address, ip, strlen(ip)); //15 chars of 4 bytes each: 60 bytes length
miguelcordero191 3:f84802422619 16 printf("Resulting flash: \r\n");
miguelcordero191 3:f84802422619 17 //for (int i = 0; i<10; i++)
miguelcordero191 3:f84802422619 18 //printf("%d\r\n", data[i]);
miguelcordero191 3:f84802422619 19 //
miguelcordero191 3:f84802422619 20 printf("%s\r\n", data_str);
miguelcordero191 3:f84802422619 21 printf("Done\r\n\n");
miguelcordero191 3:f84802422619 22
miguelcordero191 3:f84802422619 23
miguelcordero191 3:f84802422619 24 while (true) {
miguelcordero191 3:f84802422619 25 }
miguelcordero191 3:f84802422619 26 }
miguelcordero191 3:f84802422619 27 #endif