Forum Rule: Always post complete source code & details to reproduce any issue!
Tab Content
  • tonton81's Avatar
    Today, 07:48 PM
    Mike, couldnt we just do a custom find function thats specific to users needs, using a cstring match like the constructor does? example: to find and remove a matching array by indice: ca.remove(val) removes an...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    Today, 12:43 PM
    some breadboards are known to have “shorts”, use a different area or change the board altogether everythings made in china nowadays :D the wires in jumper cables are hair thin, dont expect it to carry sufficient...
    3 replies | 81 view(s)
  • tonton81's Avatar
    Today, 04:15 AM
    the hardware wont lock, the library actually (using timeslices) switches between threads, even if one is “busy” (except if a mutex deadlock occured causing threads to jam. toggling a gpio pin, well, it shouldnt be an...
    364 replies | 54490 view(s)
  • tonton81's Avatar
    Yesterday, 11:11 PM
    Hi Tady, First, in the global scope, you create a unique lock for threads accessing your variable: #include "TeensyThreads.h" Threads::Mutex myLock1; Threads::Mutex myLock2;
    364 replies | 54490 view(s)
  • tonton81's Avatar
    Yesterday, 04:54 AM
    sounds good, i didnt check if the callback was static or not, if you suggest we do that thats fine too theres also the onDetect lambda function available for hotplugging (well it detects slave was reset status, not...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-23-2018, 09:27 PM
    yes but the multiple calls makes it persistant for those bursts :)
    11 replies | 196 view(s)
  • tonton81's Avatar
    04-23-2018, 06:41 PM
    if your getting gps data from uart, i suggest you use serialevent, i was handling data both ways at 3megabaud rates (3000000) without the use of rts/cts, youll likely collect the gps data from that if your loop() is...
    11 replies | 196 view(s)
  • tonton81's Avatar
    04-23-2018, 06:20 PM
    most people dont realize/care about the miniscule latency of double :)
    11 replies | 196 view(s)
  • tonton81's Avatar
    04-23-2018, 04:33 PM
    except it would be awkward to control multiple indices? :P
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-23-2018, 01:05 PM
    ideally, for a find function, it must be something kind of easy to handle. think about this for a minute the library already knows the size, but what if the user doesnt? we could return a pointer to the array, but user...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-23-2018, 12:40 PM
    Tim, i committed the list() with float array support for push_back and pop_front and check this post for another feature: https://forum.pjrc.com/threads/50008-Project-SPI_MSTransfer?p=176931&viewfull=1#post176931
    65 replies | 1887 view(s)
  • tonton81's Avatar
    04-23-2018, 12:50 AM
    i only ran ground from t3.6 pin next to pin13, and jumpered it to 3.5 slave besides pin0 and pin below 13 of t3.5 to common ground
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-23-2018, 12:40 AM
    i had issues at 30 at first, but it was due to bad ground, see #1431, its running with the 3.2 slave fix running on t3.5 @ 30mhz
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-23-2018, 12:21 AM
    Yeah seen that, but I'm not sure c++ iterators work over custom templates, besides, we don't want to search for single values in our system, i think it's better to search for matching headers in the arrays
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-22-2018, 11:59 PM
    I would need a prototype idea for a find to make one, I can actually have the function return you a pointer to the dataset, and possibly modify it "live", just like iterating edits T *find(etc.... ) // library method...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-22-2018, 11:55 PM
    Mike, it's a very clean and efficient remove: template<typename T, uint16_t _size, uint16_t multi> bool Circular_Buffer<T,_size,multi>::remove(uint16_t pos) { if ( multi ) { if ( pos >= _size ) return 0; ...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-22-2018, 11:48 PM
    Btw, now we can find and remove/edit queues in any location (not just front or back), I just need to add a find function :P am I creating a super ::list ? :P
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-22-2018, 11:47 PM
    Mike, so with the ifdef's its good for you? confirmed?
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-22-2018, 11:45 PM
    Guys, I did something crazy, probably will be used, or not, when I added the list() method, I just made a ::remove(indice) method: Circular_Buffer<uint8_t, 4, 6> ca; uint8_t buf = { 0, 1, 2, 3, 4, 5 }; ...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-22-2018, 07:22 PM
    But the 3.5 is working at 30MHz with the fixed one for the 3.2... Yesturday I had a bad ground link and added 2 grounds and it worked :o
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-22-2018, 06:01 PM
    tonton81 replied to a thread uNav INS in General Discussion
    im sure someone might find 18 uarts and 3 usberials, 7spi busses, 12 wire busses, and ~180 gpio control useful lol :) Just think what would happen if we could, instead of using the 12Mbps USBSerial, if the 480 ever...
    621 replies | 13002 view(s)
  • tonton81's Avatar
    04-22-2018, 04:56 PM
    I've updated github with the latest SPI_MST and circular buffer as per recent posts :) Also added T list(); as a supported method for the Ring Buffer of the readme.md file for Circular_Buffer repo, which gained...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-22-2018, 02:58 PM
    cant do LC... currently the library handles 16bit data,, where the LC registers for SPI are 8bit for low and 8bit for high this would require rewriting a very good portion of the library and several ifdefs just to...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-22-2018, 02:11 PM
    tonton81 replied to a thread uNav INS in General Discussion
    Just wire the GPS TX to both setups, with common ground, and both setups can use it :)
    621 replies | 13002 view(s)
  • tonton81's Avatar
    04-22-2018, 12:26 PM
    Bounce buttons+ 1] = { Bounce (0, DEBOUNCE_TIME), Bounce (1, DEBOUNCE_TIME), Bounce (2, DEBOUNCE_TIME), Bounce (3, DEBOUNCE_TIME), Bounce (4, DEBOUNCE_TIME), Bounce (5, DEBOUNCE_TIME), Bounce (6,...
    6 replies | 145 view(s)
  • tonton81's Avatar
    04-22-2018, 11:57 AM
    After the CB list,push_back,pop_front mods yesturday i let the SPI_MST run overnight @ stock cpu speeds and 30MHz :) 11628.00, #, #, #, #, #, #, #, #, #, #, #,384787748,77582 F&F (OT=0) OT_CALC==100 micros()...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-22-2018, 12:48 AM
    Circular_Buffer<float, 4, 6> flt; float _f = { 123.456789, 789.012345 }; float _f1 = { 333.78643, 69.11 }; float _f2 = { 88.02, 743.69 }; flt.push_back(_f, 2); flt.push_back(_f1, 2); flt.push_back(_f2,...
    65 replies | 1887 view(s)
  • tonton81's Avatar
    04-21-2018, 11:35 PM
    Circular Ring Buffer Queue Size: 7 / 16 Indice: Entries: -3.1415901 -12.3456001 -78.9123383 -7.9123402 -11.9123402 -58.9123383 -18.9123402 Circular Array...
    65 replies | 1887 view(s)
  • tonton81's Avatar
    04-21-2018, 05:42 PM
    I was pulled out of the house for an 8 IP camera installation so im not home, ill work on the list when i get back :)
    65 replies | 1887 view(s)
  • tonton81's Avatar
    04-21-2018, 04:02 PM
    tonton81 replied to a thread uNav INS in General Discussion
    Don, i tested dual slaves and upped a video, its crazy stuff :) https://www.youtube.com/watch?v=xD9TTK5cL6g it was based on a 3.2 slave, 3.5 slave, and 3.6 master
    621 replies | 13002 view(s)
  • tonton81's Avatar
    04-21-2018, 03:46 PM
    Fiddling around with it I came to this autoformatting based on floats/doubles vs ints: floats/doubles: Queue Size: 7 Indice: ...
    65 replies | 1887 view(s)
  • tonton81's Avatar
    04-21-2018, 03:12 PM
    Like this? Queue Size: 7 Indice: Entry: -3.1415901 -12.3456001 -78.9123383 -7.9123402 -11.9123402 -58.9123383 -18.9123402
    65 replies | 1887 view(s)
  • tonton81's Avatar
    04-21-2018, 02:22 PM
    I have to do a few casts for floats, but yes (casts for the indices, not the float itself :)
    65 replies | 1887 view(s)
  • tonton81's Avatar
    04-21-2018, 02:13 PM
    Like this? Queue Size: 5 ___________________________Entries:___________________________ 0 0 1 2 3 4 5 (6 entries.) 1 6 7 8 9 10 11 (6 entries.) 2 12 13 14 15 16 17 (6 entries.) 3 18 19...
    65 replies | 1887 view(s)
  • tonton81's Avatar
    04-21-2018, 01:39 PM
    Tim, like this? Circular_Buffer<uint8_t, 8> k; k.push_back(1); k.push_back(2); k.push_back(3); k.push_back(4); k.push_back(5); k.push_back(6); k.push_back(7);
    65 replies | 1887 view(s)
  • tonton81's Avatar
    04-21-2018, 01:29 AM
    Mike, I loaded up the "simple" wire test demo I made you "as-is" and it's working..... https://forum.pjrc.com/threads/50008-Project-SPI_MSTransfer?p=175770&viewfull=1#post175770 #1279 ... Size: 54 Slave: 43 Port:...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-21-2018, 01:22 AM
    yeah, 180 you'll get intermittant... thats why mostly i used ~ 200 or higher, which on 3.5 results in 4.7k Hz, Tim can push 6K im sure, since 10uS F&F loops() makes a difference of ~ 300Hz
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-21-2018, 01:18 AM
    no choice to cast. This, also, if you want a circular array of floats/doubles, the "methods" that work for primitives need to be casted to int as well, otherwise it wont accept floats/doubles, and compiler will complain...
    65 replies | 1887 view(s)
  • tonton81's Avatar
    04-21-2018, 01:03 AM
    5312Hz at 180uS F&F overload1 loops! Tim, im sure you can push 6K if 20uS makes a difference on a T3.5 lol 5010 at 190uS F&F loops()
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-21-2018, 01:02 AM
    Im getting 4790Hz now F&F overload1 with the working SPI0 registers using T3.6 master and T3.5 slave, stock cpus 30mhz spi bus, using default events() (500uS) and 200uS timer F&F's
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-21-2018, 12:56 AM
    That is possible yes, anything else to add there? btw, the floats/doubles list() threw compile errors when I added list() support, due to the Type not being "int" when calling the array indices, I had to cast alot...
    65 replies | 1887 view(s)
  • tonton81's Avatar
    04-21-2018, 12:51 AM
    nevermind!, I added a secondary ground line and 30 is working!
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-21-2018, 12:49 AM
    No, I reattached the T3.5, however it doesnt seem to work at 30 anymore, 24 is okay, maybe its the wires.... ? heh definately not the SPI0 registers this time
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-21-2018, 12:48 AM
    did you try the last posted library on your t3.6's ?:)
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-21-2018, 12:47 AM
    Yeah but we need to push 2 8bit registers SPI0_DL && SPI0_DH, and read them like the POPR, it's a 2 way register, but thats alot of ifdefs and code rewriting to adapt! it's not as simple as a redefine...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-21-2018, 12:45 AM
    I cant seem to get it above 24mhz either, even with the old SPI registers. The working one should be recommended though because "it works" for both, the 30mhz issue is from something else....
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-21-2018, 12:36 AM
    you mean where the H and T are in the actual raw buffer? (i dont follow :P )
    65 replies | 1887 view(s)
  • tonton81's Avatar
    04-20-2018, 11:31 PM
    Also remember to use events(500) (if you used old sketches... ) they might be set lower...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 11:17 PM
    I don't think we'll be able to do LC... the LC requires writes to 2 addresses, and without re-writing all the switches in the ISR to compensate for 2 writes, we can't do much The register expects 8bit writes only, and...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 10:53 PM
    Keep the SAME library, just change in the CPP, let me know if that works: Change this: SIM_SCGC6 |= SIM_SCGC6_SPI0; // enable slave clock SPI0_MCR |= SPI_MCR_HALT | SPI_MCR_MDIS; SPI0_MCR =...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 10:51 PM
    If it is... I can always add if/def's to make it automatic switchable :) can you try to copy the old ::begin() over to test?
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 09:39 PM
    LC not supported yet, so no rush :)
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 09:34 PM
    awesome! Can I dismantle my dual slave setup and poke around the LC? :)
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 09:01 PM
    even 1Hz is working lol EDIT: events(0) is working with 400uS f&f’s! but thats too much overhead, leave events() blank, it defaults to 500uS :)
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 09:01 PM
    oh just so you know, 3.2 still cant do 30 :) but less is ok
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 08:59 PM
    Can you test and let me know your 3.2 functionality at all speeds????????????????
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 08:57 PM
    Trial and error!?!?! AND A POWER NAP! I knew something was wrong when the BUS WAS UNAFFECTED by the T3.2 slave crashing when the T3.5 continued operation! So I went to poke around the registers!
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 08:54 PM
    Yes mike! Short answer! Spi slave register configuration ordering is important! THAT OR the 3.2 isnt capable of a single ninstruction set!!
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 08:49 PM
    I GOT 1 KHZ WORKING!!! F&F (OT=0) OT_CALC==3000000 micros() _time==24784 F&F (OT=0) OT_CALC==3000000 micros() _time==24784 F&F (OT=0) OT_CALC==3000000 micros() _time==24783 F&F (OT=0) OT_CALC==3000000 micros()...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 08:47 PM
    OK I GOT IT!!!! i got both running at 1mhz!!!
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 08:42 PM
    Stored. printout is from head to tail (available only) yes stored order head to tail good? :)
    65 replies | 1887 view(s)
  • tonton81's Avatar
    04-20-2018, 08:09 PM
    https://forum.pjrc.com/threads/31202-SPI-slave-phase-not-correct
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 08:00 PM
    here is what i noticed, changing the bus speed on the 3.2 only works within 20-24mhz, higher or lower breaks ...itself? i commented out the 3.2 only transmissions, and changed speeds to any value, even 1mhz, and the...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 04:35 PM
    T3.6 host, T3.5 slave, T3.2 slave, 24 mhz all round :) i tried different speeds between both but one slave gives up data flow unless the speeds match Weird.. but both set at same speed work fine :)
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 03:53 PM
    LOL Mike Guess we know this works? :P https://www.youtube.com/watch?v=xD9TTK5cL6g
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 01:39 PM
    I'm pretty sure Tim could prolly pass 5K Hz in his setup if im able to reach 4745 with a T3.5 :P, and 3110 Hz with a 3.2 :P
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 01:36 PM
    Alright mike, try this use 24000000, NOT 30000000 then try this: uint32_t OverTime = 0; void loop() { static uint32_t _timer = millis(); teensy_gpio.events(500); if ( !(millis() % 100) ) { ...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 01:33 PM
    Mike, main issue, its not the library Select 24000000, the T3.5/T3.2 cant do 30 it seems! I'm tweaking the millis code in loop now, but above post stands working without any library mods..
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 01:30 PM
    Hey look where im at now: 47436.00, #, #, #, #, #, #, #, #, #, #, #,80771,25
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 01:29 PM
    note, im getting this btw: 19600.00, #, #, #, #, #, #, #, #, #, #, #,12357,24 ill find a sweet spot and report back to you for testing..
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 01:27 PM
    Ok, Im getting close, let me work on it, i just got it running at least, ill tweak it out and let you know, the LC ill work on later, to add it's SPI registers as they are different, hopefully we can get those online on...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 12:57 PM
    I hope I find it, im warming up the solder gun, and after dismantling everything, so no more 3.6+3.5 setup after this lol would be nice if tim could report the latest thread copy working against 2 of his 3.6's, since...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 12:48 PM
    Just letting you know im home now, before i dismantle everything in the setup its still running 4745Hz with 0 OT on T3.5/T3.6, :) 35552.00, #, #, #, #, #, #, #, #, #, #, #,275635072,58226 _time==50 F&F...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 07:58 AM
    Mike, maybe ill find time later today to rip my setup apart, solder pins to one of my t3.2’s, and hook up a 3.5 to a 3.2 for testing on my setup. maybe this way i can finally see the issues your describing with 3.2’s,...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 07:44 AM
    Tim, for ring buffer list() https://forum.pjrc.com/threads/50008-Project-SPI_MSTransfer?p=176301&viewfull=1#post176301 is this okay or you want other formatting options?
    65 replies | 1887 view(s)
  • tonton81's Avatar
    04-20-2018, 07:30 AM
    ouch! code brackets??? :o
    22 replies | 42276 view(s)
  • tonton81's Avatar
    04-20-2018, 04:15 AM
    still blasting here at 4745 Hz f&f’s :) even if you got the 3.2 working at 1sec delay, thats a good starting point to tweak the different timing areas to see where it crashes
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-20-2018, 04:10 AM
    did u try modifying MHZ, or added delay to “slowdown” in H file? remember we set > 12mhz no delay? theres a setting somewhere u dont have setup i think
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-19-2018, 10:13 PM
    i hope you truly installed the latest copy :) i havnt touched it since i posted it on #1353... its not on github..
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-19-2018, 10:00 PM
    go higher, exagerate if you have to, its micros() so try like 33333, maybe ur 3.2 cant handle a faster micros? if i go 300 or below i get what you got on #1368, when i go over 400 no issues, even works when i put 10000...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-19-2018, 09:32 PM
    #1368 will happen if you DON'T specify the value Find your sweet spot so we can update it as default :) default is 100 (uS) , 400 or higher is working on my t3.5 slave
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-19-2018, 09:28 PM
    this is the one im running ATM non stop, OT still 0, 4746 Hz F&F's Master: #include <SPI.h> #include <SPI_MSTransfer.h> #include "A_ConfigDefines.h" //#define SPI_SPEED 30500 #define SPI_SPEED 30000000...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-19-2018, 09:23 PM
    did you specify events(value)??? specifically 500 or higher? the 3.2 might need higher value keep slave at events(0) only change master
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-19-2018, 08:41 PM
    WITH THE T3.5 OC @ 168MHZ SLAVE:::::: 0 == 4745 @ 200 uS !!!!!!!!! 1 == 4745 @ 200 uS !!!!!!!!!!!!! 2 == 2367 @ 400 uS Tim???????????????????????????????????????????????? :)
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-19-2018, 08:26 PM
    No lags at that rate at all, using 700 micros for events() and 400micros timer! its always within 2376 -> 2378 no jumping, no lag, STABLE! results!! above is with OVERLOAD 1 with OVERLOAD 2, to stop...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-19-2018, 08:25 PM
    THIS at 30mhz stock CPUs 38440.00, #, #, #, #, #, #, #, #, #, #, #,544494,39051 2376 ,10 38452.00, #, #, #, #, #, #, #, #, #, #, #,544495,39051 void loop() { static uint32_t _timer = millis(); ...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-19-2018, 08:18 PM
    Holy crap tim!! 58300.00, #, #, #, #, #, #, #, #, #, #, #,94627,35295 2115 ,9 58324.00, #, #, #, #, #, #, #, #, #, #, #,94629,35295 thats modifying TVmaster timer to micros instead of millis, this: if (...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-19-2018, 08:16 PM
    For TVmaster tho, events() should be in main loop, not timed...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-19-2018, 08:13 PM
    64784.00, #, #, #, #, #, #, #, #, #, #, #,49499,0 ALC==100 micros() _time==52 F&F (OT=24) OT_CALC==100 micros() _time==51 F&F (OT=24) OT_CALC==100 micros() _time==52 F&F (OT=24) OT_CALC==100 micros()...
    1464 replies | 31111 view(s)
  • tonton81's Avatar
    04-19-2018, 08:13 PM
    Mike, from the github, I loaded TVmaster and TVslave demo "as-is" and wow its flooding like crazy! working well!...
    1464 replies | 31111 view(s)
More Activity
About tonton81

Basic Information

About tonton81
Biography:
Seriously? ;)
Location:
Montreal, Canada
Interests:
computers, micros, telecoms, gate systems, access systems, security systems, cars
Occupation:
sorter/driver/shipping

Statistics


Total Posts
Total Posts
2,074
Posts Per Day
4.21
Last Post
Project: SPI_MSTransfer Today 07:48 PM
General Information
Last Activity
Today 08:14 PM
Join Date
12-18-2016