**** BEGIN LOGGING AT Fri Jan 07 02:59:57 2022 Jan 07 03:06:00 Anywho. So, @zmatt, no. That receiver thing you showed me will not work, i.e. as there is only one port that is supposed to go where? Jan 07 03:06:56 Anyway, no issue. I just thought I could rehash the issue of me not knowing anything (as usual). Jan 07 03:11:52 of all the things I miss in life, I forget what it was the most Jan 07 03:20:03 so does the beaglebone ai have a special defconfig? because the bb.org_defconfig is getting super hot Jan 07 03:23:28 mranostaj, you can nuke the am3 stuff. ;) Jan 07 03:23:41 sorry it's a kitchensink... Jan 07 03:24:54 rcn-ee: but is there a defconfig i can sanely use? :) Jan 07 03:25:36 so while i've tested the BBB with omap2plus defconfig, i've never tried that on a bbai... it might work... Jan 07 03:26:46 hmm but is there a x15/ai one floating around also using the 5.10 branch Jan 07 03:27:11 oh, grab ti's config... (opens browser) Jan 07 03:27:38 https://github.com/RobertCNelson/ti-linux-kernel-dev/blob/ti-linux-5.10.y/patches/ti_sdk_dra7x_release_defconfig Jan 07 03:27:49 i use it for reference, when ti makes a change.. Jan 07 03:29:59 mranostaj, while in that branch.. ti has config builder... run: ./ti_config_fragments/defconfig_builder.sh -l Jan 07 03:30:17 that's where i borrowed it's output from: https://github.com/RobertCNelson/ti-linux-kernel-dev/blob/ti-linux-5.10.y/build_kernel.sh#L50-L73 Jan 07 03:30:50 all that is in our 5.10-ti branch direct copy from ti.. Jan 07 03:31:23 https://github.com/beagleboard/linux/tree/5.10/ti_config_fragments Jan 07 03:38:46 mranostaj, since it's mostly a script and fully automated when i push builds.. do you want me to generate ti's dra7x_release for am57x and other for am33xx builds? Jan 07 03:39:04 they wouldn't really be tested.. but i think TI tests them... Jan 07 03:41:04 can't hurt to generate but i'll look at the branch too Jan 07 04:10:08 hmm... does the pocketbeagle exist? Jan 07 04:10:48 i have one, but it had a few too many sparks one day Jan 07 04:28:51 hays: you mean the supply chain.. and backorders? or that i've seen one? :) Jan 07 05:14:22 rcn-ee: using that fragment it still overheats and shut down Jan 07 05:24:42 mranostaj: well sometimes things are obsolete or otherwise canceled vs. hard to get a hold of Jan 07 05:25:02 so was curious if the pocket was former or latter Jan 07 05:51:13 hays: was looking at mouser recently.. did notice some backordered till like dec 2022 Jan 07 15:33:04 mranostaj, did you plug in the fan cape? https://www.newark.com/element14/6100310/beaglebone-ai-fan-cape/dp/50AH3704 Jan 07 15:33:24 bbai likes to overheat idling in it's default state... Jan 07 19:09:46 goddamnit TI... they gave pruss a nice peripheral for doing bidirectional I/O ("EDIO, part of IEP"), and then on the am335x at least completely botched the integration by creating two pinmux modes for it, one that is input-only (output-enable is ignored), and one that is output-only (input always reads as zero) Jan 07 19:10:10 why would you do such a thing /o\ Jan 07 19:18:45 hi, can someone please help with using pwm ? Jan 07 19:18:49 thx Jan 07 19:19:47 configure period (in ns), configure duty_cycle (in ns), set enable to 1 Jan 07 19:20:00 update duty_cycle to change pwm output Jan 07 19:20:31 keep in mind that the 'a' and 'b' channels of one ehrpwm instance are required to have the same period Jan 07 19:23:18 i have difficulties enable the pwm channels: Jan 07 19:23:20 -bash: echo: write error: Device or resource busy Jan 07 19:23:36 -bash: echo: write error: Invalid argument Jan 07 19:23:38 what period did you configure? Jan 07 19:24:19 better now, it was 0 Jan 07 19:25:58 I have no idea how you got EBUSY though, that doesn't seem to be an error you should ever be able to get from trying to configure or enable pwm channels Jan 07 19:26:25 when writing 1 to enable although period was 0 Jan 07 19:27:37 that should return EINVAL, not EBUSY Jan 07 19:27:59 "Invalid argument", not "Device or resource busy" Jan 07 19:28:46 i try writing to pwm-3:0 for pin 9_14 Jan 07 19:28:54 ? Jan 07 19:28:59 i can't export pwmchip Jan 07 19:29:04 they're already exported Jan 07 19:29:14 ok Jan 07 19:30:04 there's udev rules that export them and create symlinks in /dev/pwm/ Jan 07 19:30:33 ok, nothing yet to scope though Jan 07 19:30:38 (at least some versions of the udev rules do this) Jan 07 19:30:50 did you configure the pin to pwm mode using config-pin ? Jan 07 19:31:07 checking Jan 07 19:31:41 yes Jan 07 19:32:18 with "config-pin P9.14 pwm" Jan 07 19:32:36 what period and duty_cycle did you configure? Jan 07 19:33:19 duty 50 Jan 07 19:33:34 period 250000 Jan 07 19:33:44 enable 1 Jan 07 19:33:50 50 nanoseconds? does your scope have enough bandwidth to see pulses that narrow? Jan 07 19:34:22 duty 125000 Jan 07 19:34:59 on device pwm-3:0 Jan 07 19:35:17 I have no idea what that is, pwmchip numbering is arbitrary and undefined Jan 07 19:35:28 ok Jan 07 19:35:35 use the symlinks in /dev/pwm/ if you want to be sure you're using the right device Jan 07 19:36:00 i measure on pin 9.14 not sure which pwm this will be. Trying other ones. Jan 07 19:36:10 P9.14 is ehrpwm1a Jan 07 19:36:45 i see those only Jan 07 19:36:46 pwm-0:0 pwm-1:1 pwm-4:0 pwm-6:0 pwm-7:1 pwmchip1 pwmchip4 pwmchip7 Jan 07 19:36:46 pwm-1:0 pwm-3:0 pwm-4:1 pwm-7:0 pwmchip0 pwmchip3 pwmchip6 Jan 07 19:36:56 at /sys/class/pwm Jan 07 19:36:59 20:35 <@zmatt> use the symlinks in /dev/pwm/ Jan 07 19:37:17 ok i missed that Jan 07 19:37:18 thx Jan 07 19:37:30 showing me which pwmchip numbers you have is useless since, 20:35 <@zmatt> I have no idea what that is, pwmchip numbering is arbitrary and undefined Jan 07 19:39:17 many thanks Jan 07 19:39:24 works Jan 07 19:39:38 yep i missed the dev tree Jan 07 19:39:49 that's all right with this one Jan 07 19:41:13 Doing IR detection, i needed an accurate pwm for that purpose, since IR modules required 38 kHz or kHz modulated signal. Jan 07 19:41:50 yeah I've been advocating for using udev to create convenient symlinks to hopefully combat people hardcoding paths or numbers into software that aren't actually stable but can change based on kernel version or device tree configuration Jan 07 19:42:14 I have a similar rule for gpio, though I'm not sure if that one's installed by default Jan 07 19:44:12 IR detection or IR transmission? Jan 07 19:44:41 detection Jan 07 19:45:05 huh, why do you need a PWM output for that? Jan 07 19:45:53 so I get an IR led and a receiver module which I need to figure out the right tuning, so i need flexibility on frequency. Jan 07 19:46:12 ah to test your IR receiver Jan 07 19:46:43 The ir module works with a band pass filter hence the ir led needs to be modulated at 38 kHz. I also need to test it, right, and tune it. Jan 07 19:47:51 Found this in the application note Jan 07 19:47:51 https://www.vishay.com/docs/82741/tssp4056sensor.pdf Jan 07 19:49:33 the uarts on the am335x actually support IR transmission and reception (both IrDA and free-format, with integrated carrier modulation/demodulation) ... the problem is as usual driver support, or lack thereof Jan 07 19:49:59 the principle is to move the emitter modulation from best working frequency (38 kHz) downward until loosing the ir reception. this gives the IR reflection level. Based on this we can evaluate the presence of objects. Jan 07 19:50:13 ah, that kind of detection Jan 07 19:50:17 i see Jan 07 19:50:25 I assumed communication, never mind Jan 07 19:50:33 for this purpose nope Jan 07 19:51:37 wouldn't it make more sense to keep the frequency at 38 kHz and use the duty_cycle to (sort of) modulate the signal strength? Jan 07 19:53:42 to modulate 38 kHz i need the PWM, there's no modulator in the LED, it's just an IR led 940nm. Jan 07 19:53:59 I understand Jan 07 19:54:17 i think both approaches are possible Jan 07 19:54:41 i'd need 2 PWM then. Jan 07 19:54:43 they are, but the response w.r.t. frequency would be hard to predict and dependent on the filtering Jan 07 19:54:46 no Jan 07 19:54:50 why? Jan 07 19:55:18 one for modulating 38 kHz and one for signal power modulating much higher frequency Jan 07 19:55:30 just vary the duty cycle between 0 and period/2 Jan 07 19:55:58 yep Jan 07 19:56:24 i'll test that way, did'nt thought of it Jan 07 19:57:37 I think the amplitude of the fundamental frequency of a pwm signal is proportional to sin(Pi*duty_cycle/period) Jan 07 19:57:57 with a maximum at duty_cycle=period/2 Jan 07 19:58:15 rcn-ee__: fan cape on order now :). have a desk fan on it for now :) Jan 07 19:58:42 i did'nt know Jan 07 19:59:33 and all of the harmonics are odd multiples of the fundamental frequency, i.e. 114 kHz or higher, so probably blocked by the bandpass filter Jan 07 19:59:45 mranostaj, the 'fan cape' also disables the 400Mhz opp.. if you have fan force the overlay... Jan 07 19:59:54 (or patch the dt..) to remove the 400mHz opp.. Jan 07 20:00:17 there are 38 kHz and 56 kHz, apparently those are the 2 standard mainly used Jan 07 20:00:27 rcn-ee__: heh board is a little ducted tape together i see :) Jan 07 20:00:46 successfully modulating at 38 k now. Jan 07 20:00:58 i assume the fan runs at full blast on startup right? Jan 07 20:01:19 I saw someone mention they figured out how to control the fan Jan 07 20:01:31 mranostaj, yeap.. nmingotti figured out control... Jan 07 20:01:38 it's a black box micro.. Jan 07 20:01:49 jfsimon1981: I mean for a 38 kHz pwm signal Jan 07 20:01:51 it was also the last design by "x" before we moved everything to seeed... Jan 07 20:02:47 * mranostaj facepalms Jan 07 20:03:18 Good news: A lot of BBBs just arrived to my country.. and in a great timing (R-Pi s shortage) Jan 07 20:03:39 yes Jan 07 20:03:44 rcn-ee__: I still find the 400 MHz "opp" odd... since it's not a defined opp you can't use a lower voltage, and without being able to drop the voltage it *should* actually result in higher power consumption (by reducing idle time for the same workload) if power management, specifically cpuidle, is working like it should... which may not be the case Jan 07 20:07:05 zmatt, that was a face palm, @jkridner noticed that last year i think.. pmic isn't even wired to lower voltage.. Jan 07 20:08:45 it is though? or does the swapped (and entirely unnecessary) connection to the pmic's second i2c port demolish the entire bus? Jan 07 20:12:22 that second port will just see nothing but start and stop conditions, so I doubt it will ever touch either of the bus lines Jan 07 20:14:20 but that second i2c interface is meant for hardware-controlled dvfs (which is not supported by the SoC) and merely exposes a small subset of the registers exposed on the first i2c interface, so it's entirely irrelevant Jan 07 20:15:42 I'm pretty sure the system wouldn't even boot if communication with the pmic were impossible Jan 07 21:21:32 Hi my company is looking to export a BBONE-BLACK-4G overseas but as the compliance person I need the ECCN tariff schedule and country of Origin how do you guys provide that if at all? Jan 07 21:23:26 If you would like the email me the answer I can be reached at andrew.shotwell@caci.com Jan 07 21:24:34 rcn-ee__: heh so the PIC emulates the id ROM for the fan cape? Jan 07 21:30:48 mranostaj, yeap! Jan 07 21:41:20 zmatt, i'll try your approach, doing the c++ program to estimate the distance based on when the ir receptor triggers, and playing with the duty to follow the reception limit. See if that works ... Jan 07 23:01:26 jfsimon1981: I also realized my earlier remark about a pwm spectrum's signal having only odd harmonics is nonsense, that's only true for a square wave (50% duty cycle) Jan 07 23:03:27 https://docs.google.com/spreadsheets/d/1IRxNrCeXii06Tpk8fV3QymuzZsq19atB-PwzpGEGt-k/edit?usp=sharing Jan 07 23:03:38 I think there must be, but the module has a band pass filter, that's leaving off most signal passed 1.3:1 frequency ratio Jan 07 23:04:02 i'm implementing the limit finder now ... (ir reception threshold). Interesting Jan 07 23:04:08 yep, and a pwm signal's spectrum definitely only consists of harmonics of the pwm frequency, so only the fundamental should pass the bandpass Jan 07 23:04:57 Got something, i'm trying to move objects, see if the device detects the diff. Jan 07 23:05:35 this sounds like something for which you'd want a detector that outputs an analog value Jan 07 23:05:54 yes harmonics are mostly discarded. Jan 07 23:05:56 (or use some off-the-shelf proximity sensor) Jan 07 23:08:55 they were too slow, so i have to build a custom one. It may exist as we need but the BBB also includes a graphic interface so on. Jan 07 23:10:37 too slow? there's a huge variety of proximity sensors, it can't be that hard to find one that meets your needs and isn't too painful to interface to the bbb Jan 07 23:10:53 not sure what you mean by the graphic interface and such... what does that have to do with a sensor? Jan 07 23:12:01 i mean thus i decided to incorporate all that with the bbb Jan 07 23:12:15 the optical sensor it not too difficult to build Jan 07 23:12:58 wouldn't ultrasonic be more accurate? those are pretty cheap and ubiquitous Jan 07 23:13:18 it may need to be customized in dimension and sensitity, i did'nt look too much into the market. I went for testing see if the approach works. Jan 07 23:13:37 I think ultrasonic would be a right way, i did'nt think of it Jan 07 23:13:55 maybe both approaches would do. Jan 07 23:14:00 ir/us Jan 07 23:15:36 love it, that seems to work ... Jan 07 23:16:04 the am335x has some nice peripherals that can measure pulse width and pulse distance with 10ns or even 5ns resolution Jan 07 23:16:31 definitely seem to work Jan 07 23:16:44 nice Jan 07 23:16:50 happy Jan 07 23:17:46 by the way i ramp the duty cycle and find the reception thrshold Jan 07 23:18:05 so that approach looks to be working. **** ENDING LOGGING AT Sat Jan 08 02:59:56 2022