Search found 15 matches

by XXzzz
Mon Oct 08, 2018 2:36 pm
Forum: STM32 Support
Topic: stm32f103zet6 wwdg/iwdg driver
Replies: 1
Views: 1458

stm32f103zet6 wwdg/iwdg driver

i saw the iwdg source in chibios 172 ,and i try to use it .but it doesn't work . the register can be set to right value. but it doesn't reset stm32(i'm not reset iwdg).and the register value is ffff . who can give me some advice to deal this problem ? maybe i need try to use wwdg and write wwdg driv...
by XXzzz
Mon Oct 08, 2018 11:20 am
Forum: Bug Reports
Topic: RTCv1 + GCC7: rtc_decode() produces random output Topic is solved
Replies: 5
Views: 3249

Re: RTCv1 + GCC7: rtc_decode() produces random output Topic is solved

i also have this question.and then i fix the source throught time_t.but when i get time .the first time is right,and then it return some random number. then i found something wrong in rtcConvertStructTmToDateTime(&tim, tv_msec, timespec); when i comment it and use struct tm. i got the right time...
by XXzzz
Thu May 31, 2018 5:08 am
Forum: ChibiOS/HAL
Topic: some question about source code
Replies: 8
Views: 4828

Re: some question about source code

this code is in the CHIBIOS182->testex->STM32F4XX->I2C-BMP085
maybe my problem description is not very accurate,
thanks for your help again
by XXzzz
Thu May 31, 2018 5:05 am
Forum: ChibiOS/HAL
Topic: some question about source code
Replies: 8
Views: 4828

some question about source code

when i reading the source code ,i have some question about the object oriented in chibios. the struct BMP085Driver have four members,and there have some methods in the vmt. static BMP085Driver BMP085D1; /** * @brief BMP085 driver structure. */ struct BMP085Driver { /** @brief BaseSensor Virtual Meth...
by XXzzz
Mon Jan 08, 2018 4:57 am
Forum: ChibiOS/HAL
Topic: about the pwm callback
Replies: 1
Views: 1954

about the pwm callback

i have some question about the pwm driver...i draw a picture to describe this question ,but i don't know how to post it to this ..... :oops: https://drive.google.com/file/d/1r3nk972_LFE7r7QH6eT9CYx8CAUIWMmP/view?usp=sharing i use the stm32f103,maybe i need to change the pwm config to deal this probl...
by XXzzz
Mon Jan 01, 2018 9:00 am
Forum: STM32 Support
Topic: a project with pwm and adc
Replies: 9
Views: 4633

Re: a project with pwm and adc

i got that.That's a really good way to do it. I need pay more attention to the doc.thanks again
by XXzzz
Sun Dec 31, 2017 2:24 pm
Forum: STM32 Support
Topic: a project with pwm and adc
Replies: 9
Views: 4633

Re: a project with pwm and adc

now my code has another bug.., when i set the depth=8,and the callback return the n =4, depth=16,n=8; this is my test code ,it work like pwmstart->pwmcallback->adcStartConversion->adccallback->Bsem->thread then the thread print the samples buffer and n. #include <stdio.h> #include <string.h> #includ...
by XXzzz
Sun Dec 31, 2017 10:23 am
Forum: STM32 Support
Topic: a project with pwm and adc
Replies: 9
Views: 4633

Re: a project with pwm and adc

now i change the thread to this static THD_WORKING_AREA(waThread2, 128); static THD_FUNCTION(Thread2, arg) { (void)arg; chRegSetThreadName("current"); while (true) { msg_t msg = chBSemWaitTimeout(&current_bsem, MS2ST(500)); /* time out*/ if (msg == MSG_TIMEOUT) { chprintf((BaseSequenti...
by XXzzz
Fri Dec 29, 2017 12:17 pm
Forum: STM32 Support
Topic: a project with pwm and adc
Replies: 9
Views: 4633

Re: a project with pwm and adc

now i do a new test on stm32f103zet6 #include <stdio.h> #include <string.h> #include "ch.h" #include "hal.h" #include "ch_test.h" #include "usbcfg.h" #include "myshell.h" #define SHELL_WA_SIZE THD_WORKING_AREA_SIZE(2048) binary_semaphore_t bsem; stat...
by XXzzz
Fri Dec 29, 2017 11:10 am
Forum: STM32 Support
Topic: a project with pwm and adc
Replies: 9
Views: 4633

Re: a project with pwm and adc

now i change my code to test my callback ,clear the light in callback ,and set the light in thread ,and callback is working, static void pwmc1cb(PWMDriver *pwmp) { (void)pwmp; chSysLockFromISR(); adcStartConversionI(&ADCD1, &adcgrpcfg, samples, ADC_GRP_BUF_DEPTH); chSysUnlockFromISR(); palCl...

Go to advanced search