Jump to content

    

BioWolf2000

Свой
  • Content Count

    111
  • Joined

  • Last visited

Community Reputation

0 Обычный

About BioWolf2000

  • Rank
    Частый гость
  • Birthday 02/21/1980

Контакты

  • Сайт
    http://
  • ICQ
    280907035
  • Skype
    zhukowski

Информация

  • Город
    Беларусь, Минск

Старые поля

  • LinkedIn
    https://www.linkedin.com/in/%D0%B0%D0%BD%D0%B4%D1%80%D0%B5%D0%B9-%D0%B6%D1%83%D0%BA%D0%BE%D0%B2%D1%8

Recent Profile Visitors

2535 profile views
  1. Где теперь искать информацию по AVR?

    Когда часто меняешь архитектуру, то уже без разницы какой камень выбирать. Больше смотришь на фичи типа потребления, периферии Мой путь был такой - MCS-51, AVR (сначала на ASM потом на С и потом С++ баловался), PIC16, PIC18, dsPIC33, PIC32, XMC4800 ради Ethercat, STM32f1, STM32f4, STM32F7. Сейчас присматриваюсь к FPGA Xilinx Zynq 7010 SOC c DUAL CORE ARM CORTEX A9 (Хочу разобраться с Linux), платка уже лежит на столе
  2. Где теперь искать информацию по AVR?

    в таком корпусе вспоминаются еще PIC10F200T, PIC10F222T, PIC10F320T-I/OT И потребление в активном режиме почти на порядок меньше чем у Attiny
  3. I2C HAL DS2482

    Внутри stm32f7xx_hal_i2c.c есть описание (@) These interfaces allow to manage a sequential transfer with a repeated start condition when a direction change during transfer [..] (+) A specific option field manage the different steps of a sequential transfer (+) Option field values are defined through @ref I2C_XFEROPTIONS and are listed below: (++) I2C_FIRST_AND_LAST_FRAME: No sequential usage, functionnal is same as associated interfaces in no sequential mode (++) I2C_FIRST_FRAME: Sequential usage, this option allow to manage a sequence with start condition, address and data to transfer without a final stop condition (++) I2C_FIRST_AND_NEXT_FRAME: Sequential usage (Master only), this option allow to manage a sequence with start condition, address and data to transfer without a final stop condition, an then permit a call the same master sequential interface several times (like @ref HAL_I2C_Master_Seq_Transmit_IT() then @ref HAL_I2C_Master_Seq_Transmit_IT() or @ref HAL_I2C_Master_Seq_Transmit_DMA() then @ref HAL_I2C_Master_Seq_Transmit_DMA()) (++) I2C_NEXT_FRAME: Sequential usage, this option allow to manage a sequence with a restart condition, address and with new data to transfer if the direction change or manage only the new data to transfer if no direction change and without a final stop condition in both cases (++) I2C_LAST_FRAME: Sequential usage, this option allow to manage a sequance with a restart condition, address and with new data to transfer if the direction change or manage only the new data to transfer if no direction change and with a final stop condition in both cases (++) I2C_LAST_FRAME_NO_STOP: Sequential usage (Master only), this option allow to manage a restart condition after several call of the same master sequential interface several times (link with option I2C_FIRST_AND_NEXT_FRAME). Usage can, transfer several bytes one by one using HAL_I2C_Master_Seq_Transmit_IT(option I2C_FIRST_AND_NEXT_FRAME then I2C_NEXT_FRAME) or HAL_I2C_Master_Seq_Receive_IT(option I2C_FIRST_AND_NEXT_FRAME then I2C_NEXT_FRAME) or HAL_I2C_Master_Seq_Transmit_DMA(option I2C_FIRST_AND_NEXT_FRAME then I2C_NEXT_FRAME) or HAL_I2C_Master_Seq_Receive_DMA(option I2C_FIRST_AND_NEXT_FRAME then I2C_NEXT_FRAME). Then usage of this option I2C_LAST_FRAME_NO_STOP at the last Transmit or Receive sequence permit to call the oposite interface Receive or Transmit without stopping the communication and so generate a restart condition. (++) I2C_OTHER_FRAME: Sequential usage (Master only), this option allow to manage a restart condition after each call of the same master sequential interface. Usage can, transfer several bytes one by one with a restart with slave address between each bytes using HAL_I2C_Master_Seq_Transmit_IT(option I2C_FIRST_FRAME then I2C_OTHER_FRAME) or HAL_I2C_Master_Seq_Receive_IT(option I2C_FIRST_FRAME then I2C_OTHER_FRAME) or HAL_I2C_Master_Seq_Transmit_DMA(option I2C_FIRST_FRAME then I2C_OTHER_FRAME) or HAL_I2C_Master_Seq_Receive_DMA(option I2C_FIRST_FRAME then I2C_OTHER_FRAME). Then usage of this option I2C_OTHER_AND_LAST_FRAME at the last frame to help automatic generation of STOP condition.
  4. I2C HAL DS2482

    Может поможет, у меня похожая задача была - считать device id FRAM MR44V100A Device ID Read Sequence 1. Next to Start condition, send 0xF8. MR44V100A responds ACK signal. 2. Send the Slave address (WA16 and R/W are “Don’t care”). MR44V100A responds ACK signal. 3. Again next to Start condition, send 0xF9. MR44V100A responds ACK signal, then outputs 3 bytes of Device ID. 4. Send Stop condition and finish the sequence. Решил эту проблему через HAL так В кубе поставил галочки и написал вот такой код #include "MR44V100A.h" //private varibales static uint8_t device_address; static I2C_HandleTypeDef *hi2c; HAL_StatusTypeDef MR44V100A_Init(I2C_HandleTypeDef *handle_i2c, uint8_t dev_addr) { HAL_StatusTypeDef status; device_address = dev_addr; hi2c = handle_i2c; uint8_t tmp[3]; tmp[0]= (device_address << 1); status = HAL_I2C_Master_Seq_Transmit_IT(hi2c, 0xF8, &tmp[0], 1, I2C_FIRST_FRAME); if (status != HAL_OK) return status; while (HAL_I2C_GetState(hi2c) != HAL_I2C_STATE_READY) ; status = HAL_I2C_Master_Seq_Receive_IT(hi2c, 0xF9, tmp, 3, I2C_LAST_FRAME); if (status != HAL_OK) return status; while (HAL_I2C_GetState(hi2c) != HAL_I2C_STATE_READY) ; if ((tmp[0]==0x01)&&(tmp[1]==0xb0)&&(tmp[2]==0x00))//MR44V100A ID read OK return HAL_OK; else return HAL_ERROR; } HAL_StatusTypeDef MR44V100A_readByte(uint32_t register_address, uint8_t* data) { return MR44V100A_readBytes(register_address, 1, data); } HAL_StatusTypeDef MR44V100A_writeByte(uint32_t register_address, uint8_t data) { return MR44V100A_writeBytes(register_address, 1, &data); } HAL_StatusTypeDef MR44V100A_writeBytes(uint32_t register_address, uint32_t length, uint8_t* data) { assert_param((register_address + length - 1) <= 0x1FFFF); HAL_StatusTypeDef status = HAL_I2C_Mem_Write( hi2c, (device_address << 1) | (((register_address&(1 << 16)) ? 1 : 0) << 1), //add 16th bit of address(WA16) (uint16_t)register_address, I2C_MEMADD_SIZE_16BIT, data, length, 1000); while (HAL_I2C_IsDeviceReady(hi2c, (device_address << 1), 1, HAL_MAX_DELAY) != HAL_OK) ; return status; } HAL_StatusTypeDef MR44V100A_readBytes(uint32_t register_address, uint32_t length, uint8_t* data) { assert_param((register_address + length - 1) <= 0x1FFFF); return HAL_I2C_Mem_Read( hi2c, (device_address << 1) | (((register_address&(1 << 16)) ? 1 : 0) << 1), (uint16_t)register_address, I2C_MEMADD_SIZE_16BIT, data, length, 1000); } ps Посмотрел логическим анализатором шину, после первой посылки STOP не формируется
  5. В первую очередь на разводку земель надо обращать внимание https://www.rezonit.ru/support/articles/cad/03/ http://caxapa.ru/lib/emc_immunity.html
  6. Прошивал китайские ST-Link v2 патченным Reflash. (STLinkReflashFixed.exe)
  7. STM32H743ZI и VBAT Charging

    Спасибо за пояснения. Нашел в HAL библиотеке функции /* Battery control functions */ void HAL_PWREx_EnableBatteryCharging(uint32_t ResistorValue); void HAL_PWREx_DisableBatteryCharging(void); /* Power VBAT/Temperature monitoring functions */ void HAL_PWREx_EnableMonitoring(void); void HAL_PWREx_DisableMonitoring(void); uint32_t HAL_PWREx_GetTemperatureLevel(void); uint32_t HAL_PWREx_GetVBATLevel(void);
  8. STM32H743ZI и VBAT Charging

    Изучаю H7 серию и натолкнулся в описании на Low-power modes: Sleep, Stop, Standby and VBAT supporting battery charging Означает ли это, что я могу поставить аккумулятор и не беспокоитбся о схеме зарядки? Аккумулятор типа такого https://www.digikey.com/product-detail/en/seiko-instruments/ML414H-IV01E/728-1052-1-ND/1889213
  9. Visual Studio + visualGDB + STM32

    Уже два года сижу на Visual Studio, после Keil и IAR не нарадуюсь удобству редактирования кода
  10. Датчик температуры STM32F4xx

    Я использую макрос __LL_ADC_CALC_TEMPERATURE из stm32f4xx_ll_adc.h. Библиотека использует калибровочные данные из адресов #define TEMPSENSOR_CAL1_ADDR ((uint16_t*) (0x1FFF7A2CU)) /* Internal temperature sensor, address of parameter TS_CAL1: On STM32F4, temperature sensor ADC raw data acquired at temperature 30 DegC (tolerance: +-5 DegC), Vref+ = 3.3 V (tolerance: +-10 mV). */ #define TEMPSENSOR_CAL2_ADDR ((uint16_t*) (0x1FFF7A2EU)) /* Internal temperature sensor, address of parameter TS_CAL2: On STM32F4, temperature sensor ADC raw data acquired at temperature 110 DegC (tolerance: +-5 DegC), Vref+ = 3.3 V (tolerance: +-10 mV). */ Пример использования есть в STM32Cube\Repository\STM32Cube_FW_F4_V1.24.0\Projects\STM32F411RE-Nucleo\Examples_LL\ADC\ADC_TemperatureSensor\ Для F7 серии STM32Cube\Repository\STM32Cube_FW_F7_V1.15.0\Projects\STM32F767ZI-Nucleo\Examples_LL\ADC\ADC_TemperatureSensor\ F3 STM32Cube\Repository\STM32Cube_FW_F3_V1.10.0\Projects\STM32F334R8-Nucleo\Examples_LL\ADC\ADC_TemperatureSensor\ F2 STM32Cube\Repository\STM32Cube_FW_F2_V1.7.0\Projects\STM32F207ZG-Nucleo\Examples_LL\ADC\ADC_TemperatureSensor\ F1 STM32Cube\Repository\STM32Cube_FW_F1_V1.7.0\Projects\STM32F103RB-Nucleo\Examples_LL\ADC\ADC_TemperatureSensor\ F0 STM32Cube\Repository\STM32Cube_FW_F0_V1.9.0\Projects\STM32F072RB-Nucleo\Examples_LL\ADC\ADC_TemperatureSensor\
  11. Нашел статью, где работают с 15-омными датчиками Photocurrent Measurement of PC and PV HgCdTe Detectors
  12. Вот еще пути решения проблем в статье aleksandrov2014.pdf JMO_Low_61_1187_draft.pdf
  13. http://facta.junis.ni.ac.rs/eae/fu2k41/11zb.pdf Тут немного по ИК диодам
  14. Visual Studio + visualGDB + STM32

    В настройках Debug поставить вместо оптимизации -O0 - -Og и посмотреть что получится
  15. Visual Studio + visualGDB + STM32

    Еще неплохо бы глянуть логи \Debug\EmbeddedProject1.log