Search found 280 matches

by edogaldo
Sat Nov 18, 2017 12:48 pm
Forum: General discussion
Topic: Serial communication (PA9 & PA10) with stm32 bootloader
Replies: 2
Views: 46

Re: Serial communication (PA9 & PA10) with stm32 bootloader

You should use Serial1 if you want to output to USART1 when using the Maple bootloader.
by edogaldo
Wed Nov 08, 2017 1:18 pm
Forum: General discussion
Topic: Delay less than 1 µs ?
Replies: 14
Views: 239

Re: Delay less than 1 µs ?

YOU very much. I will try to do so Sorry, I made a mistake with setting BSRR.. Here a correction anyway I'm not able to test it on the F407 so I cannot guarantee there are no more errors: void setup() { // put your setup code here, to run once: pinMode(PA5,OUTPUT); //GPIOA.regs->BSRR = 0x0020; // s...
by edogaldo
Wed Nov 08, 2017 11:14 am
Forum: General discussion
Topic: Delay less than 1 µs ?
Replies: 14
Views: 239

Re: Delay less than 1 µs ?

you commented out "nop" loop () { digitalWrite(PA5,LOW); //asm volatile ("nop"); digitalWrite(PA5, HIGH); } the time remains the same - 200 ns at the switching state on pine ((( If you want to achieve clock level speed you need to go with assembly.. Here a sample asm sketch to toggle PA5 on F407: v...
by edogaldo
Tue Nov 07, 2017 4:19 pm
Forum: General discussion
Topic: Delay less than 1 µs ?
Replies: 14
Views: 239

Re: Delay less than 1 µs ?

Of course it's the digitalWrite and loop overhead..
14ns is the duration of the single asm(nop) (on f407 it's 1us/168 = 6ns) which is far little respect to the duration of all other stuff..
by edogaldo
Mon Nov 06, 2017 12:49 pm
Forum: General discussion
Topic: Delay less than 1 µs ?
Replies: 14
Views: 239

Re: Delay less than 1 µs ?

Running @72MHz your clock period is little less than 14ns (assuming an F103 mcu) so I'd say that 14ns is the minimum resolution you could achieve.
To delay one clock cycle by code you could use:

Code: Select all

asm volatile ("nop");
by edogaldo
Sun Nov 05, 2017 3:53 pm
Forum: General discussion
Topic: Is the core's USB support dependent on the bootloader?
Replies: 3
Views: 95

Re: Is the core's USB support dependent on the bootloader?

In the Libmaple core the USB Serial is activated by setting pre-processor directive SERIAL_USB.
This is set in boards.txt depending on the upload method you chose.
Particularly, the Serial upload method does not drive USB Serial activation ootb but you could add it.

Best, E.
by edogaldo
Sat Nov 04, 2017 2:37 pm
Forum: Libraries & Hardware
Topic: FreeRTOSConfig.h parameters editing
Replies: 15
Views: 243

Re: FreeRTOSConfig.h parameters editing

I was just playing with Pak's sketch using the standard freertos configuration and I got this behaviour.
Maybe Pak changed something more (i.e. some config parameter or choose an upload method that for example does not drive the Maple VCP) and I was trying to find what..
by edogaldo
Sat Nov 04, 2017 9:27 am
Forum: Libraries & Hardware
Topic: FreeRTOSConfig.h parameters editing
Replies: 15
Views: 243

Re: FreeRTOSConfig.h parameters editing

Same problem also with v 9.0
by edogaldo
Sat Nov 04, 2017 6:26 am
Forum: Libraries & Hardware
Topic: FreeRTOSConfig.h parameters editing
Replies: 15
Views: 243

Re: FreeRTOSConfig.h parameters editing

I found the issue was due to the allocated stack size. If I set: xTaskCreate( vTaskFunction, "Task 1", 1000, (void*)pcTextForTask1, 1, NULL ); xTaskCreate( vTaskFunction, "Task 2", 1000, (void*)pcTextForTask2, 2, NULL ); the code breaks and Windows can't even recognize the Maple Serial USB. If inste...
by edogaldo
Fri Nov 03, 2017 4:58 pm
Forum: Libraries & Hardware
Topic: FreeRTOSConfig.h parameters editing
Replies: 15
Views: 243

Re: FreeRTOSConfig.h parameters editing

Pak, now I have a question for you: if I try your example with only one task, everything is working fine; if instead I add the second task then the program hangs.. So questions: when did you last get the Libmaple core code? what OS are you using? which version of Arduino GUI and GCC compiler are you...